@@ -31,6 +31,7 @@ select = [
31
31
" DTZ004" , # Use datetime.fromtimestamp(ts, tz=) instead of datetime.utcfromtimestamp(ts)
32
32
" E" , # pycodestyle
33
33
" F" , # pyflakes/autoflake
34
+ " F541" , # f-string without any placeholders
34
35
" FLY" , # flynt
35
36
" FURB" , # refurb
36
37
" G" , # flake8-logging-format
@@ -47,6 +48,7 @@ select = [
47
48
" PIE" , # flake8-pie
48
49
" PL" , # pylint
49
50
" PT" , # flake8-pytest-style
51
+ " PTH" , # flake8-pathlib
50
52
" PYI" , # flake8-pyi
51
53
" RET" , # flake8-return
52
54
" RSE" , # flake8-raise
@@ -81,9 +83,12 @@ select = [
81
83
" SLOT" , # flake8-slots
82
84
" T100" , # Trace found: {name} used
83
85
" T20" , # flake8-print
84
- " TID251" , # Banned imports
86
+ " TC" , # flake8-type-checking
87
+ " TID" , # Tidy imports
85
88
" TRY" , # tryceratops
86
89
" UP" , # pyupgrade
90
+ " UP031" , # Use format specifiers instead of percent format
91
+ " UP032" , # Use f-string instead of `format` call
87
92
" W" , # pycodestyle
88
93
]
89
94
@@ -102,7 +107,6 @@ ignore = [
102
107
" PLR0915" , # Too many statements ({statements} > {max_statements})
103
108
" PLR2004" , # Magic value used in comparison, consider replacing {value} with a constant variable
104
109
" PLW2901" , # Outer {outer_kind} variable {name} overwritten by inner {inner_kind} target
105
- " PT004" , # Fixture {fixture} does not return anything, add leading underscore
106
110
" PT011" , # pytest.raises({exception}) is too broad, set the `match` parameter or use a more specific exception
107
111
" PT018" , # Assertion should be broken down into multiple parts
108
112
" RUF001" , # String contains ambiguous unicode character.
@@ -113,6 +117,12 @@ ignore = [
113
117
" SIM103" , # Return the condition {condition} directly
114
118
" SIM108" , # Use ternary operator {contents} instead of if-else-block
115
119
" SIM115" , # Use context handler for opening files
120
+
121
+ # Moving imports into type-checking blocks can mess with pytest.patch()
122
+ " TC001" , # Move application import {} into a type-checking block
123
+ " TC002" , # Move third-party import {} into a type-checking block
124
+ " TC003" , # Move standard library import {} into a type-checking block
125
+
116
126
" TRY003" , # Avoid specifying long messages outside the exception class
117
127
" TRY400" , # Use `logging.exception` instead of `logging.error`
118
128
# Ignored due to performance: https://github.com/charliermarsh/ruff/issues/2923
0 commit comments