From 7fd7db9cd12d59f7c523dc2a1a167f7445e5b2f3 Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Mon, 4 May 2026 18:38:58 +0200 Subject: Add support for the %e{key} format and add support for type checkers (ty) --- .ruff.toml | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to '.ruff.toml') diff --git a/.ruff.toml b/.ruff.toml index 769f83c..da8c030 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -2,36 +2,34 @@ cache-dir = "~/.cache/ruff" indent-width = 4 line-length = 79 target-version = "py310" +namespace-packages = ["tests"] + [lint] select = ["ALL"] -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"] -# D105 - Missing docstring in magic method -# D200 - One-line docstring should fit on one line -# D203 - 1 blank line required before class docstring +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"] + +# BLE001 - Do not catch blind exception: `Exception` +# COM812 - Trailing comma missing # D205 - 1 blank line required between summary line and description +# D212 - Multi-line docstring summary should start at the first line +# D400 - First line should end with a period +# D401 - First line of docstring should be in imperative mood # D403 - First word of the first line should be capitalized: `str` -> `Str` +# D415 - First line should end with a period, question mark, or exclamation point # FBT001 - Boolean-typed positional argument in function definition # FBT002 - Boolean default positional argument in function definition # PTH111 - `os.path.expanduser()` should be replaced by `Path.expanduser()` -# RUF012 - Mutable class attributes should be annotated with `typing.ClassVar` -# RUF013 - PEP 484 prohibits implicit `Optional` # S101 - Use of `assert` detected # TRY300 - Consider moving this statement to an `else` block # TRY400 - Use `logging.exception` instead of `logging.error` # UP020 - Use builtin `open` # Project specific -# C901 - `X` is too complex -# D200 - One-line docstring should fit on one line -# D402 - First line should not be the function's signature (bug in ruff 0.4.4) # EM101 - Exception must not use a string literal, assign to variable first # EM102 - Exception must not use an f-string literal, assign to variable first # FBT003 - Boolean positional value in function call -# INP001 - File `tests/test_envtoolkit_instance_static.py` is part of an implicit namespace package. Add an `__init__.py`. -# PLR0912 - Too many branches # PLR0913 - Too many arguments in function definition -# PLR0915 - Too many statements # PLR2004 - Magic value used in comparison, consider replacing `X` with a constant variable # PLW2901 - `for` loop variable `value` overwritten by assignment target # S603 - `subprocess` call: check for execution of untrusted input @@ -42,9 +40,6 @@ ignore = ["COM812", "D105", "D202", "D203", "D205", "D211", "D212", "D400", "D40 fixable = ["ALL"] unfixable = [] -[lint.per-file-ignores] -"tests/*.py" = ["ANN"] # Do not require annotations for tests - [format] # Like Black, use double quotes for strings. -- cgit v1.3