@@ -9,15 +9,30 @@ exclude = [
9
9
10
10
[lint ]
11
11
extend-select = [
12
- " C901" ,
13
- " W" ,
12
+ # upstream
13
+
14
+ " C901" , # complex-structure
15
+ " I" , # isort
16
+ " PERF401" , # manual-list-comprehension
17
+ " W" , # pycodestyle Warning
18
+
19
+ # Ensure modern type annotation syntax and best practices
20
+ # Not including those covered by type-checkers or exclusive to Python 3.11+
21
+ " FA" , # flake8-future-annotations
22
+ " F404" , # late-future-import
23
+ " PYI" , # flake8-pyi
24
+ " UP006" , # non-pep585-annotation
25
+ " UP007" , # non-pep604-annotation
26
+ " UP010" , # unnecessary-future-import
27
+ " UP035" , # deprecated-import
28
+ " UP037" , # quoted-annotation
29
+ " UP043" , # unnecessary-default-type-args
14
30
15
31
# local
16
32
" ANN2" , # missing-return-type-*
17
33
" F" , # Pyflakes
18
34
" F404" , # late-future-import
19
35
" FA" , # flake8-future-annotations
20
- " I" , # isort
21
36
" PERF" , # Perflint
22
37
" PGH" , # pygrep-hooks (blanket-* rules)
23
38
" PT" , # flake8-pytest-style
@@ -28,18 +43,11 @@ extend-select = [
28
43
" YTT" , # flake8-2020
29
44
]
30
45
ignore = [
31
- " PERF203" , # try-except-in-loop, micro-optimisation with many false-positive. Worth checking but don't block CI
32
- " PT007" , # temporarily disabled, TODO: configure and standardize to preference
33
- " PT011" , # temporarily disabled, TODO: tighten expected error
34
- " PT012" , # pytest-raises-with-multiple-statements, avoid extra dummy methods for a few lines, sometimes we explicitly assert in case of no error
35
- " TRY003" , # raise-vanilla-args, avoid multitude of exception classes
36
- " TRY301" , # raise-within-try, it's handy
37
- " UP015" , # redundant-open-modes, explicit is preferred
38
- " UP038" , # Using `X | Y` in `isinstance` call is slower and more verbose https://github.com/astral-sh/ruff/issues/7871
39
- # Only enforcing return type annotations for public functions
40
- " ANN202" , # missing-return-type-private-function
41
- " ANN204" , # missing-return-type-special-method
42
-
46
+ # upstream
47
+
48
+ # Typeshed rejects complex or non-literal defaults for maintenance and testing reasons,
49
+ # irrelevant to this project.
50
+ " PYI011" , # typed-argument-default-in-stub
43
51
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
44
52
" W191" ,
45
53
" E111" ,
@@ -55,6 +63,19 @@ ignore = [
55
63
" COM819" ,
56
64
" ISC001" ,
57
65
" ISC002" ,
66
+
67
+ # local
68
+ " PERF203" , # try-except-in-loop, micro-optimisation with many false-positive. Worth checking but don't block CI
69
+ " PT007" , # temporarily disabled, TODO: configure and standardize to preference
70
+ " PT011" , # temporarily disabled, TODO: tighten expected error
71
+ " PT012" , # pytest-raises-with-multiple-statements, avoid extra dummy methods for a few lines, sometimes we explicitly assert in case of no error
72
+ " TRY003" , # raise-vanilla-args, avoid multitude of exception classes
73
+ " TRY301" , # raise-within-try, it's handy
74
+ " UP015" , # redundant-open-modes, explicit is preferred
75
+ " UP038" , # Using `X | Y` in `isinstance` call is slower and more verbose https://github.com/astral-sh/ruff/issues/7871
76
+ # Only enforcing return type annotations for public functions
77
+ " ANN202" , # missing-return-type-private-function
78
+ " ANN204" , # missing-return-type-special-method
58
79
]
59
80
60
81
[lint .per-file-ignores ]
0 commit comments