@@ -222,7 +222,7 @@ select = [
222222 # ruff-specific rules ('RUF')
223223# "RUF001", # String contains ambiguous {}. Did you mean {}?
224224 " RUF002" , # Docstring contains ambiguous {}. Did you mean {}?
225- # "RUF003", # Comment contains ambiguous {}. Did you mean {}?
225+ " RUF003" , # Comment contains ambiguous {}. Did you mean {}?
226226 " RUF005" , # Consider `{expression}` instead of concatenation
227227 " RUF006" , # Store a reference to the return value of `{expr}.{method}`
228228 " RUF007" , # Prefer `itertools.pairwise()` over `zip()` when iterating over successive pairs
@@ -231,7 +231,7 @@ select = [
231231 " RUF010" , # Use explicit conversion flag
232232# "RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
233233 " RUF013" , # PEP 484 prohibits implicit `Optional`
234- # "RUF015", # Prefer `next({iterable})` over single element slice
234+ " RUF015" , # Prefer `next({iterable})` over single element slice
235235 " RUF016" , # Slice in indexed access to type `{value_type}` uses type `{index_type}` instead of an integer
236236 " RUF017" , # Avoid quadratic list summation
237237 " RUF018" , # Avoid assignment expressions in `assert` statements
@@ -243,13 +243,21 @@ select = [
243243 " RUF024" , # Do not pass mutable objects as values to `dict.fromkeys`
244244 " RUF026" , # `default_factory` is a positional-only argument to `defaultdict`
245245# "RUF027", # Possible f-string without an `f` prefix
246- # "RUF028", # This suppression comment is invalid because {}
247- # "RUF029", # Function `{name}` is declared `async`, but doesn't `await` or use `async` features.
248- " RUF030" , # `print()` expression in `assert` statement is likely unintentional
249- # "RUF031", # Use parentheses for tuples in subscripts.
246+ " RUF028" , # This suppression comment is invalid because {}
247+ " RUF029" , # Function `{name}` is declared `async`, but doesn't `await` or use `async` features.
248+ " RUF030" , # `print()` call in `assert` statement is likely unintentional
249+ " RUF031" , # Use parentheses for tuples in subscripts
250250 " RUF032" , # `Decimal()` called with float literal argument
251251 " RUF033" , # `__post_init__` method with argument defaults
252- " RUF034" , # Useless if-else condition
252+ " RUF034" , # Useless `if`-`else` condition
253+ " RUF035" , # Unsafe use of `{name}` detected
254+ " RUF036" , # `None` not at the end of the type annotation.
255+ " RUF038" , # `Literal[True, False, ...]` can be replaced with `Literal[...] | bool`
256+ # "RUF039", # First argument to {call} is not raw string
257+ " RUF040" , # Non-string literal used as assert message
258+ " RUF041" , # Unnecessary nested `Literal`
259+ # "RUF048", # `__version__` may contain non-integral-like elements
260+ " RUF055" , # Plain string pattern passed to `re` function
253261# "RUF100", # Unused `noqa` directive
254262 " RUF101" , # `{original}` is a redirect to `{target}`
255263 " RUF200" , # Failed to parse pyproject.toml: {message}
@@ -292,10 +300,10 @@ select = [
292300[lint .per-file-ignores ]
293301"doc/*" = [
294302 " ANN" , # documentation doesn't need annotations
295- " TCH001 " , # documentation doesn't need type-checking blocks
303+ " TC001 " , # documentation doesn't need type-checking blocks
296304]
297305"doc/conf.py" = [" INP001" , " W605" ]
298- "doc/development/tutorials/examples/*" = [" INP001" ]
306+ "doc/development/tutorials/examples/*" = [" I002 " , " INP001" ]
299307# allow print() in the tutorial
300308"doc/development/tutorials/examples/recipe.py" = [
301309 " FURB118" ,
@@ -359,8 +367,8 @@ select = [
359367]
360368
361369# these tests need old ``typing`` generic aliases
362- "tests/test_util/test_util_typing.py" = [" UP006" , " UP007" , " UP035" ]
363- "tests/test_util/typing_test_data.py" = [" FA100" , " PYI030" , " UP006" , " UP007" , " UP035" ]
370+ "tests/test_util/test_util_typing.py" = [" RUF036 " , " UP006" , " UP007" , " UP035" ]
371+ "tests/test_util/typing_test_data.py" = [" FA100" , " I002 " , " PYI030" , " UP006" , " UP007" , " UP035" ]
364372
365373"utils/*" = [
366374 " T201" , # whitelist ``print`` for stdout messages
@@ -377,6 +385,9 @@ inline-quotes = "single"
377385forced-separate = [
378386 " tests" ,
379387]
388+ required-imports = [
389+ " from __future__ import annotations" ,
390+ ]
380391
381392[format ]
382393preview = true
0 commit comments