@@ -44,7 +44,19 @@ docstring-code-format = true
4444docstring-code-line-length = " dynamic"
4545
4646[tool .ruff .lint ]
47- select = [
47+ extend-ignore = [
48+ " E501" , # Line too long
49+ " PT011" , # `pytest.raises(ValueError)` is too broad
50+ " PT022" , # No teardown in fixture
51+ " F841" , # Local variable is assigned but never used
52+ " COM812" , # missing-trailing-comma
53+ " ISC001" , # single-line-implicit-string-concatenation
54+ " ISC002" , # multi-line-implicit-string-concatenation
55+ ]
56+ extend-select = [
57+ # "C90", # Many false positives # C90; mccabe: https://docs.astral.sh/ruff/rules/complex-structure/
58+ # "DTZ", # Dates with timezones are different from dates without timezones # DTZ; flake8-datetimez: https://docs.astral.sh/ruff/rules/#flake8-datetimez-dtz
59+
4860 # flake8-builtins
4961 # https://docs.astral.sh/ruff/rules/#flake8-builtins-a
5062 #
@@ -58,17 +70,28 @@ select = [
5870 # Check docstring formatting. Many of these rules are intentionally ignored below.
5971 " D" ,
6072
61- # pyflakes - unused-import
62- # https://docs.astral.sh/ruff/rules/unused-import/
63- #
64- # Check for unused imports.
65- " F401" ,
66-
67- # isort
68- # https://docs.astral.sh/ruff/rules/#isort-i
69- #
70- # Sort imports.
71- " I" ,
73+ " E" , # E; pycodestyle: https://docs.astral.sh/ruff/rules/#pycodestyle-e-w
74+ " F" , # F; Pyflakes: https://docs.astral.sh/ruff/rules/#pyflakes-f
75+ " I" , # I; isort: https://docs.astral.sh/ruff/rules/#isort-i
76+ " B" , # B; flake8-bugbear: https://docs.astral.sh/ruff/rules/#flake8-bugbear-b
77+ " Q" , # Q; flake8-quotes: https://docs.astral.sh/ruff/rules/#flake8-quotes-q
78+ " COM" , # COM; Commas: https://docs.astral.sh/ruff/rules/#flake8-commas-com
79+ " C4" , # C4; flake8-comprehensions: https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4
80+ " FA102" , # FA102; flake8-future-annotations: https://docs.astral.sh/ruff/rules/#flake8-future-annotations-fa
81+ " ISC" , # ISC; flake8-implicit-str-concat: https://docs.astral.sh/ruff/rules/#flake8-implicit-str-concat-isc
82+ " ICN" , # ICN; flake8-import-conventions: https://docs.astral.sh/ruff/rules/#flake8-import-conventions-icn
83+ " PIE" , # PIE; flake8-pie: https://docs.astral.sh/ruff/rules/#flake8-pie-pie
84+ " PYI013" , # PYI013; flake8-pyi Non-empty class body must not contain `...`: https://docs.astral.sh/ruff/rules/#flake8-pyi-pyi
85+ " PYI030" , # PYI030; flake8-pyi Multiple literal members in a union: https://docs.astral.sh/ruff/rules/#flake8-pyi-pyi
86+ " PYI034" , # PYI034; flake8-pyi `__new__` methods usually reutrn `Self`: https://docs.astral.sh/ruff/rules/#flake8-pyi-pyi
87+ " PT" , # PT; flake8-pytest-style: https://docs.astral.sh/ruff/rules/#flake8-pytest-style-pt
88+ " SIM118" , # SIM118; flake8-simplify Use `key {operator} dict`: https://docs.astral.sh/ruff/rules/#flake8-simplify-sim
89+ " TCH" , # TCH; flake8-type-checking: https://docs.astral.sh/ruff/rules/#flake8-type-checking-tch
90+ # "FIX", # FIX; flake8-fixme: https://docs.astral.sh/ruff/rules/#flake8-fixme-fix
91+ # "PGH", # PGH; pygrep-hooks: https://docs.astral.sh/ruff/rules/#pygrep-hooks-pgh
92+ " NPY" , # NPY; NumPy-specific rules: https://docs.astral.sh/ruff/rules/#numpy-specific-rules-npy
93+ " RUF005" , # RUF005; Ruff specific rules Consider {expression} instead of concatenation: https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf
94+ " RUF100" , # RUF100; Ruff specific rules Unused `noqa` directive https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf
7295]
7396ignore = [
7497 # NumPy style docstring convention with noted exceptions.
@@ -95,6 +118,14 @@ ignore = [
95118[tool .ruff .lint .pydocstyle ]
96119convention = " numpy"
97120
121+ # # Ruff is enabled in config file to run on save
122+ # Disable isort due to timing conflict with ruff
123+ [tool .isort ]
124+ skip_glob = " **"
125+ # Disable local black to avoid conflict with ruff
126+ [tool .black ]
127+ exclude = " .*"
128+
98129
99130[dependency-groups ]
100131build = [" build" ]
0 commit comments