diff options
Diffstat (limited to '.ruff.toml')
| -rw-r--r-- | .ruff.toml | 25 |
1 files changed, 10 insertions, 15 deletions
| @@ -2,36 +2,34 @@ cache-dir = "~/.cache/ruff" | |||
| 2 | indent-width = 4 | 2 | indent-width = 4 |
| 3 | line-length = 79 | 3 | line-length = 79 |
| 4 | target-version = "py310" | 4 | target-version = "py310" |
| 5 | namespace-packages = ["tests"] | ||
| 6 | |||
| 5 | 7 | ||
| 6 | [lint] | 8 | [lint] |
| 7 | select = ["ALL"] | 9 | select = ["ALL"] |
| 8 | ignore = ["COM812", "D105", "D202", "D203", "D205", "D211", "D212", "D400", "D401", "D403", "D415", "ERA001", "FBT001", "FBT002", "PTH111", "RUF012", "RUF013", "S101", "TRY300", "BLE001", "UP020", "C901", "D200", "D402", "EM101", "EM102", "FBT003", "INP001", "PLR0912", "PLR0913", "PLR0915", "PLR2004", "PLW2901", "S603", "T201", "TRY003", "TRY400"] | 10 | ignore = ["BLE001", "COM812", "D203", "D205", "D212", "D400", "D401", "D403", "D415", "FBT001", "FBT002", "PTH111", "S101", "UP020", "D200", "D402", "EM101", "EM102", "FBT003", "PLR0913", "PLR2004", "PLW2901", "S603", "T201", "TRY003", "TRY400"] |
| 9 | # D105 - Missing docstring in magic method | 11 | |
| 10 | # D200 - One-line docstring should fit on one line | 12 | # BLE001 - Do not catch blind exception: `Exception` |
| 11 | # D203 - 1 blank line required before class docstring | 13 | # COM812 - Trailing comma missing |
| 12 | # D205 - 1 blank line required between summary line and description | 14 | # D205 - 1 blank line required between summary line and description |
| 15 | # D212 - Multi-line docstring summary should start at the first line | ||
| 16 | # D400 - First line should end with a period | ||
| 17 | # D401 - First line of docstring should be in imperative mood | ||
| 13 | # D403 - First word of the first line should be capitalized: `str` -> `Str` | 18 | # D403 - First word of the first line should be capitalized: `str` -> `Str` |
| 19 | # D415 - First line should end with a period, question mark, or exclamation point | ||
| 14 | # FBT001 - Boolean-typed positional argument in function definition | 20 | # FBT001 - Boolean-typed positional argument in function definition |
| 15 | # FBT002 - Boolean default positional argument in function definition | 21 | # FBT002 - Boolean default positional argument in function definition |
| 16 | # PTH111 - `os.path.expanduser()` should be replaced by `Path.expanduser()` | 22 | # PTH111 - `os.path.expanduser()` should be replaced by `Path.expanduser()` |
| 17 | # RUF012 - Mutable class attributes should be annotated with `typing.ClassVar` | ||
| 18 | # RUF013 - PEP 484 prohibits implicit `Optional` | ||
| 19 | # S101 - Use of `assert` detected | 23 | # S101 - Use of `assert` detected |
| 20 | # TRY300 - Consider moving this statement to an `else` block | 24 | # TRY300 - Consider moving this statement to an `else` block |
| 21 | # TRY400 - Use `logging.exception` instead of `logging.error` | 25 | # TRY400 - Use `logging.exception` instead of `logging.error` |
| 22 | # UP020 - Use builtin `open` | 26 | # UP020 - Use builtin `open` |
| 23 | 27 | ||
| 24 | # Project specific | 28 | # Project specific |
| 25 | # C901 - `X` is too complex | ||
| 26 | # D200 - One-line docstring should fit on one line | ||
| 27 | # D402 - First line should not be the function's signature (bug in ruff 0.4.4) | ||
| 28 | # EM101 - Exception must not use a string literal, assign to variable first | 29 | # EM101 - Exception must not use a string literal, assign to variable first |
| 29 | # EM102 - Exception must not use an f-string literal, assign to variable first | 30 | # EM102 - Exception must not use an f-string literal, assign to variable first |
| 30 | # FBT003 - Boolean positional value in function call | 31 | # FBT003 - Boolean positional value in function call |
| 31 | # INP001 - File `tests/test_envtoolkit_instance_static.py` is part of an implicit namespace package. Add an `__init__.py`. | ||
| 32 | # PLR0912 - Too many branches | ||
| 33 | # PLR0913 - Too many arguments in function definition | 32 | # PLR0913 - Too many arguments in function definition |
| 34 | # PLR0915 - Too many statements | ||
| 35 | # PLR2004 - Magic value used in comparison, consider replacing `X` with a constant variable | 33 | # PLR2004 - Magic value used in comparison, consider replacing `X` with a constant variable |
| 36 | # PLW2901 - `for` loop variable `value` overwritten by assignment target | 34 | # PLW2901 - `for` loop variable `value` overwritten by assignment target |
| 37 | # S603 - `subprocess` call: check for execution of untrusted input | 35 | # S603 - `subprocess` call: check for execution of untrusted input |
| @@ -42,9 +40,6 @@ ignore = ["COM812", "D105", "D202", "D203", "D205", "D211", "D212", "D400", "D40 | |||
| 42 | fixable = ["ALL"] | 40 | fixable = ["ALL"] |
| 43 | unfixable = [] | 41 | unfixable = [] |
| 44 | 42 | ||
| 45 | [lint.per-file-ignores] | ||
| 46 | "tests/*.py" = ["ANN"] # Do not require annotations for tests | ||
| 47 | |||
| 48 | 43 | ||
| 49 | [format] | 44 | [format] |
| 50 | # Like Black, use double quotes for strings. | 45 | # Like Black, use double quotes for strings. |
