@@ -83,25 +83,34 @@ line-length=80
8383[tool .ruff .lint ]
8484select = [
8585 " A" , # flake8-builtins
86+ " ANN" , # flake8-annotations
87+ " ARG" , # flake8-unused-arguments
8688 " B" , # flake8-bugbear
8789 " BLE" , # flake8-blind-except
8890 " C4" , # flake8-comprehensions
8991 " D" , # pydocstyle
9092 " DTZ" , # flake8-datetimez
9193 " E" , # pycodestyle
94+ " EXE" , # flake8-executable
9295 " F" , # pyflakes
9396 " I" , # isort
9497 " ISC" , # flake8-implicit-str-concat
9598 " N" , # pep8-naming
9699 " PL" , # pylint
100+ " PGH" , # pygrep-hooks
101+ " PIE" , # flake8-pie
102+ " PYI" , # flake8-pyi
97103 " RET" , # flake8-return
104+ " RSE" , # flake8-raise
98105 " RUF" , # ruff-specific rules
99106 " S" , # flake8-bandit
100107 " SIM" , # flake8-simplify
108+ " SLF" , # flake8-self
101109 " UP" , # pyupgrade
102110 " W" , # pycodestyle-warning
103111]
104112ignore = [
113+ " ANN101" , " ANN102" , # nonsense, deprecated in ruff
105114 " D400" , " D415" , " D213" , " D205" , " D202" , " D107" , " D407" , " D413" , " D212" , " D104" , " D406" , " D105" , " D411" , " D401" , " D200" , " D203" ,
106115 " PLR0913" , " PLR2004" ,
107116 " ISC001" , # incompatible with ruff formatter
@@ -111,8 +120,9 @@ ignore = [
111120"tests/*" = [
112121 " D" , # pydocstyle: no docstrings required for tests
113122 " E501" , # line-too-long: embedded test data in "fmt: off" blocks is ok
114- " S" , # bandit: Not running bandit on tests
115123 " RUF012" , # ruff: mutable-class-default
124+ " S" , # bandit: Not running bandit on tests
125+ " SLF001" # private member access is ok in tests
116126]
117127"examples/*/*" = [
118128 " D" , # pydocstyle: no docstrings required for examples
@@ -122,6 +132,9 @@ ignore = [
122132 " S603" , # bandit: this flags all uses of subprocess.run as vulnerable
123133]
124134
135+ [tool .ruff .lint .flake8-annotations ]
136+ mypy-init-return = true
137+
125138# mypy section
126139# Read more here: https://mypy.readthedocs.io/en/stable/config_file.html#using-a-pyproject-toml-file
127140[tool .mypy ]
0 commit comments