Skip to content

Commit 51e292a

Browse files
Enforce ruff rules (RUF)
1 parent 7faba41 commit 51e292a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pyproject.toml

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

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

0 commit comments

Comments
 (0)