mirror of https://github.com/astral-sh/ruff
Add VS Code to gitignore; fix typos (#2333)
This commit is contained in:
parent
b40cd1fabc
commit
5165b703d9
|
|
@ -184,3 +184,6 @@ cython_debug/
|
|||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||
.idea/
|
||||
.vimspector.json
|
||||
|
||||
# Visual Studio Code
|
||||
.vscode/
|
||||
|
|
|
|||
|
|
@ -1216,13 +1216,13 @@ For more, see [flake8-use-pathlib](https://pypi.org/project/flake8-use-pathlib/)
|
|||
| PTH106 | pathlib-rmdir | `os.rmdir` should be replaced by `.rmdir()` | |
|
||||
| PTH107 | pathlib-remove | `os.remove` should be replaced by `.unlink()` | |
|
||||
| PTH108 | pathlib-unlink | `os.unlink` should be replaced by `.unlink()` | |
|
||||
| PTH109 | pathlib-getcwd | `os.getcwd()` should be replaced by `Path.cwd()` | |
|
||||
| PTH109 | pathlib-getcwd | `os.getcwd` should be replaced by `Path.cwd()` | |
|
||||
| PTH110 | pathlib-exists | `os.path.exists` should be replaced by `.exists()` | |
|
||||
| PTH111 | pathlib-expanduser | `os.path.expanduser` should be replaced by `.expanduser()` | |
|
||||
| PTH112 | pathlib-is-dir | `os.path.isdir` should be replaced by `.is_dir()` | |
|
||||
| PTH113 | pathlib-is-file | `os.path.isfile` should be replaced by `.is_file()` | |
|
||||
| PTH114 | pathlib-is-link | `os.path.islink` should be replaced by `.is_symlink()` | |
|
||||
| PTH115 | pathlib-readlink | `os.readlink(` should be replaced by `.readlink()` | |
|
||||
| PTH115 | pathlib-readlink | `os.readlink` should be replaced by `.readlink()` | |
|
||||
| PTH116 | pathlib-stat | `os.stat` should be replaced by `.stat()` or `.owner()` or `.group()` | |
|
||||
| PTH117 | pathlib-is-abs | `os.path.isabs` should be replaced by `.is_absolute()` | |
|
||||
| PTH118 | pathlib-join | `os.path.join` should be replaced by foo_path / "bar" | |
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ ruff_macros::define_rule_mapping!(
|
|||
D300 => violations::UsesTripleQuotes,
|
||||
D301 => violations::UsesRPrefixForBackslashedContent,
|
||||
D400 => violations::EndsInPeriod,
|
||||
D401 => crate::rules::pydocstyle::rules::non_imperative_mood::NonImperativeMood,
|
||||
D401 => rules::pydocstyle::rules::non_imperative_mood::NonImperativeMood,
|
||||
D402 => violations::NoSignature,
|
||||
D403 => violations::FirstLineCapitalized,
|
||||
D404 => violations::NoThisPrefix,
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ define_violation!(
|
|||
impl Violation for PathlibGetcwd {
|
||||
#[derive_message_formats]
|
||||
fn message(&self) -> String {
|
||||
format!("`os.getcwd()` should be replaced by `Path.cwd()`")
|
||||
format!("`os.getcwd` should be replaced by `Path.cwd()`")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -175,7 +175,7 @@ define_violation!(
|
|||
impl Violation for PathlibReadlink {
|
||||
#[derive_message_formats]
|
||||
fn message(&self) -> String {
|
||||
format!("`os.readlink(` should be replaced by `.readlink()`")
|
||||
format!("`os.readlink` should be replaced by `.readlink()`")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue