Skip to content

Commit d4aaeba

Browse files
Enforce ruff rules (RUF)
1 parent 0beb02e commit d4aaeba

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

pyproject.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ extend-select = [
8282
"TID",
8383
"I",
8484
"UP",
85+
"RUF",
8586
]
8687
ignore = [
8788
"B011", # Do not `assert False`, raise `AssertionError()`
@@ -95,6 +96,18 @@ ignore = [
9596
"E721", # Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
9697
"E741", # Ambiguous variable name: `l`
9798
"UP031", # TODO: apply this rule
99+
"RUF001", # String contains ambiguous letter
100+
"RUF002", # Docstring contains ambiguous letter
101+
"RUF005", # Consider unpacking operator instead of concatenation
102+
"RUF006", # Store a reference to the return value of `asyncio.ensure_future`
103+
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
104+
"RUF015", # Prefer `next(iter(...))` over single element slice
105+
"RUF018", # Avoid assignment expressions in `assert` statements
106+
"RUF021", # Parenthesize `a and b` expressions when chaining `and` and `or` together, to make the precedence clear
107+
"RUF022", # `__all__` is not sorted
108+
"RUF023", # `__slots__` is not sorted
109+
"RUF043", # Pattern passed to `match=` contains metacharacters but is neither escaped nor raw
110+
"RUF059", # Unpacked variable is never used
98111
]
99112

100113
[tool.ruff.lint.extend-per-file-ignores]

0 commit comments

Comments
 (0)