@@ -113,7 +113,7 @@ src = [
113113 " src" ,
114114]
115115format.docstring-code-format = true
116- lint.select = [
116+ lint.extend- select = [
117117 " B" , # bugbear
118118 " D" , # pydocstyle
119119 " E" , # pycodestyle
@@ -134,13 +134,24 @@ lint.select = [
134134 " W" , # pycodestyle
135135]
136136lint.ignore = [
137+ # flake8-async ignore
138+ " ASYNC115" , # Use `lowlevel.checkpoint()` instead of `sleep(0)`
137139 # bugbear ignore
138140 " B004" , # Using `hasattr(x, "__call__")` to test if x is callable is unreliable.
139141 " B007" , # Loop control variable `i` not used within loop body
140142 " B009" , # Do not call `getattr` with a constant attribute value
141143 " B010" , # [*] Do not call `setattr` with a constant attribute value.
142144 " B011" , # Do not `assert False` (`python -O` removes these calls)
143145 " B028" , # No explicit `stacklevel` keyword argument found
146+ # flake8-blind-except ignore
147+ " BLE001" , # Do not catch blind exception
148+ # flake8-comprehensions ignore
149+ " C400" , # Unnecessary generator (rewrite using `list()`)
150+ " C408" , # Unnecessary `dict()`/`list()`/`tuple()` call (rewrite as a literal)
151+ " C409" , # Unnecessary list literal passed to `tuple()` (rewrite as a tuple literal)
152+ " C410" , # Unnecessary list literal passed to `list()` (remove the outer call to `list()`)
153+ " C414" , # Unnecessary double cast or process
154+ " C417" , # Unnecessary `map()` usage (rewrite using a comprehension)
144155 # pydocstyle ignore
145156 " D100" , # Missing docstring in public module
146157 " D101" , # Missing docstring in public class
@@ -157,9 +168,30 @@ lint.ignore = [
157168 " D402" , # First line should not be the function's signature
158169 " D404" , # First word of the docstring should not be "This"
159170 " D415" , # First line should end with a period, question mark, or exclamation point
171+ # flake8-datetimez ignore
172+ " DTZ001" , # `datetime.datetime()` called without a `tzinfo` argument
173+ " DTZ005" , # `datetime.datetime.now()` called without a `tz` argument
160174 # pytest can do weird low-level things, and we usually know
161175 # what we're doing when we use type(..) is ...
162176 " E721" , # Do not compare types, use `isinstance()`
177+ # flake8-future-annotations ignore
178+ " FA102" , # Missing `from __future__ import annotations`, but uses PEP 585/604 syntax
179+ # flynt ignore
180+ " FLY002" , # Consider an f-string instead of string join
181+ # refurb ignore
182+ " FURB157" , # Verbose expression in `Decimal` constructor
183+ " FURB188" , # Prefer `str.removeprefix()` over conditionally replacing with slice
184+ # flake8-implicit-str-concat ignore
185+ " ISC004" , # Unparenthesized implicit string concatenation in collection
186+ # flake8-logging ignore
187+ " LOG009" , # Use of undocumented `logging.WARN` constant
188+ " LOG015" , # Call on root logger
189+ # pep8-naming ignore
190+ " N999" , # Invalid module name
191+ # perflint ignore
192+ " PERF102" , # When using only the keys or values of a dict use the `keys()`/`values()` method
193+ # pygrep-hooks ignore
194+ " PGH005" , # Mock method should be called
163195 # pylint ignore
164196 " PLC0105" , # `TypeVar` name "E" does not reflect its covariance;
165197 " PLC0414" , # Import alias does not rename original package
@@ -179,9 +211,41 @@ lint.ignore = [
179211 " PLW0603" , # Using the global statement
180212 " PLW1641" , # Does not implement the __hash__ method
181213 " PLW2901" , # for loop variable overwritten by assignment target
214+ # flake8-pytest-style ignore
215+ " PT020" , # `@pytest.yield_fixture` is deprecated, use `@pytest.fixture`
216+ " PT025" , # `pytest.mark.usefixtures` has no effect on fixtures
217+ " PT031" , # `pytest.warns()` block should contain a single simple statement
218+ # flake8-use-pathlib ignore
219+ " PTH124" , # `py.path` is in maintenance mode, use `pathlib` instead
220+ " PTH210" , # Invalid suffix passed to `.with_suffix()`
221+ # flake8-return ignore
222+ " RET501" , # Do not explicitly `return None` in function if it is the only possible return value
182223 # ruff ignore
183224 " RUF012" , # Mutable class attributes should be annotated with `typing.ClassVar`
184225 " RUF061" , # Use context-manager form of `pytest.raises()`
226+ # flake8-bandit ignore
227+ " S102" , # Use of `exec` detected
228+ " S110" , # `try`-`except`-`pass` detected, consider logging the exception
229+ " S112" , # `try`-`except`-`continue` detected, consider logging the exception
230+ # flake8-simplify ignore
231+ " SIM102" , # Use a single `if` statement instead of nested `if` statements
232+ " SIM103" , # Return the condition directly
233+ " SIM114" , # Combine `if` branches using logical `or` operator
234+ " SIM115" , # Use a context manager for opening files
235+ " SIM117" , # Use a single `with` statement with multiple contexts instead of nested `with` statements
236+ " SIM118" , # Use `key in dict` instead of `key in dict.keys()`
237+ " SIM201" , # Use `!=` instead of `not ... == ...`
238+ " SIM202" , # Use `==` instead of `not ... != ...`
239+ " SIM210" , # Remove unnecessary `True if ... else False`
240+ " SIM211" , # Use `not ...` instead of `False if ... else True`
241+ " SIM222" , # Use the simplified expression instead of `... or True`
242+ " SIM223" , # Use the simplified expression instead of `... and False`
243+ " SIM905" , # Consider using a list literal instead of `str.split()`
244+ # flake8-type-checking ignore
245+ " TC005" , # Found empty type-checking block
246+ # tryceratops ignore
247+ " TRY002" , # Create your own exception
248+ " TRY004" , # Prefer `TypeError` exception for invalid type
185249]
186250lint.per-file-ignores."doc/**/*.py" = [
187251 " PLR0133" , # Two constants compared in a comparison,
0 commit comments