You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ruff.toml
+111-1Lines changed: 111 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -11,13 +11,123 @@ select = [
11
11
]
12
12
ignore = [
13
13
"D", # pydocstyle
14
+
"TD", # TODO comments
14
15
15
-
#[*] we currently have these violations that are fixable if we want
16
+
#auto-fixable if we want to enable them in the future
16
17
"COM812", # Trailing comma missing
17
18
"RET505", # Unnecessary `...` after `return` statement
18
19
"SIM300", # Yoda condition detected
19
20
"TD006", # Invalid TODO capitalization: `...` should be `TODO`
20
21
22
+
# requires manual fix
23
+
"A001", # Variable `dict` is shadowing a Python builtin
24
+
"A002", # Function argument `...` is shadowing a Python builtin
25
+
"ANN001", # Missing type annotation for function argument `...`
26
+
"ANN002", # Missing type annotation for `...`
27
+
"ANN003", # Missing type annotation for `...`
28
+
"ANN201", # Missing return type annotation for public function
29
+
"ANN202", # Missing return type annotation for private function
30
+
"ANN204", # Missing return type annotation for special method `__str__`
31
+
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed in `...`
32
+
"ARG001", # Unused function argument: `...`
33
+
"ARG005", # Unused lambda argument: `...`
34
+
"B006", # Do not use mutable data structures for argument defaults
35
+
"B007", # Loop control variable `...` not used within loop body
36
+
"B011", # Do not `assert False` (`python -O` removes these calls), raise `AssertionError()`
37
+
"B020", # Loop control variable `...` overrides iterable it iterates
38
+
"B023", # Function definition does not bind loop variable `...`
39
+
"B904", # Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling
40
+
"B905", # `zip()` without an explicit `strict=` parameter
41
+
"BLE001", # Do not catch blind exception: `BaseException`
42
+
"C417", # Unnecessary `map()` usage
43
+
"C901", # `...` is too complex (11 > 10)
44
+
"DTZ001", # `datetime.datetime()` called without a `tzinfo` argument
45
+
"DTZ005", # `datetime.datetime.now()` called without a `tz` argument
46
+
"DTZ006", # `datetime.datetime.fromtimestamp()` called without a `tz` argument
47
+
"E402", # Module level import not at top of file
48
+
"E501", # Line too long (98 > 88)
49
+
"E711", # Comparison to `None` should be `cond is not None`
50
+
"E721", # Use `is` and `is not` for type comparisons, or `isinstance()` for isinstance checks
51
+
"E722", # Do not use bare `except`
52
+
"EM101", # Exception must not use a string literal, assign to variable first
53
+
"EM102", # Exception must not use an f-string literal, assign to variable first
54
+
"ERA001", # Found commented-out code
55
+
"EXE001", # Shebang is present but file is not executable
56
+
"EXE005", # Shebang should be at the beginning of the file
57
+
"F401", # `...` imported but unused; consider removing, adding to `__all__`, or using a redundant alias
58
+
"F403", # `...` used; unable to detect undefined names
59
+
"F405", # `...` may be undefined, or defined from star imports
60
+
"F841", # Local variable `infinity` is assigned to but never used
61
+
"FBT001", # Boolean-typed positional argument in function definition
62
+
"FBT002", # Boolean default positional argument in function definition
63
+
"FBT003", # Boolean positional value in function call
64
+
"FBT003", # Boolean positional value in function call
65
+
"FIX002", # Line contains TODO, consider resolving the issue
66
+
"G004", # Logging statement uses f-string
67
+
"INP001", # File `...` is part of an implicit namespace package. Add an `__init__.py`.
68
+
"LOG015", # `info()` call on root logger
69
+
"N802", # Function name `...` should be lowercase
70
+
"N806", # Variable `...` in function should be lowercase
71
+
"N818", # Exception name `...` should be named with an Error suffix
72
+
"N999", # Invalid module name: '...'
73
+
"PERF203", # `try`-`except` within a loop incurs performance overhead
74
+
"PIE810", # Call `startswith` once with a `tuple`
75
+
"PLC0415", # `import` should be at the top-level of a file
76
+
"PLR0913", # Too many arguments in function definition
77
+
"PLR1704", # Redefining argument with the local name `number`
78
+
"PLR2004", # Magic value used in comparison, consider replacing `4` with a constant variable
79
+
"PLW0108", # Lambda may be unnecessary; consider inlining inner function
80
+
"PLW1641", # Object does not implement `__hash__` method
81
+
"PLW2101", # Threading lock directly created in `with` statement has no effect
82
+
"PLW2901", # `for` loop variable `...` overwritten by assignment target
83
+
"PT009", # Use a regular `assert` instead of unittest-style `assertTrue`
84
+
"PT013", # Incorrect import of `pytest`; use `import pytest` instead
85
+
"PT015", # Assertion always fails, replace with `pytest.fail()`
86
+
"PT027", # Use `pytest.raises` instead of unittest-style `assertRaises`
87
+
"PTH100", # `os.path.abspath()` should be replaced by `Path.resolve()`
88
+
"PTH102", # `os.mkdir()` should be replaced by `Path.mkdir()`
89
+
"PTH103", # `os.makedirs()` should be replaced by `Path.mkdir(parents=True)`
90
+
"PTH107", # `os.remove()` should be replaced by `Path.unlink()`
91
+
"PTH110", # `os.path.exists()` should be replaced by `Path.exists()`
92
+
"PTH113", # `os.path.isfile()` should be replaced by `Path.is_file()`
93
+
"PTH116", # `os.stat()` should be replaced by `Path.stat()`, `Path.owner()`, or `Path.group()`
94
+
"PTH118", # `os.path.join()` should be replaced by `Path` with `/` operator
95
+
"PTH119", # `os.path.basename()` should be replaced by `Path.name`
96
+
"PTH120", # `os.path.dirname()` should be replaced by `Path.parent`
97
+
"PTH122", # `os.path.splitext()` should be replaced by `Path.suffix`, `Path.stem`, and `Path.parent`
98
+
"PTH123", # `open()` should be replaced by `Path.open()`
99
+
"PYI034", # `__enter__` methods in classes like `Storyboard` usually return `self` at runtime
100
+
"PYI036", # The first argument in `__exit__` should be annotated with `object` or `type[BaseException] | None`
101
+
"RET504", # Unnecessary assignment to `...` before `return` statement
102
+
"RUF005", # Consider `[*...]` instead of concatenation
103
+
"RUF012", # Mutable default value for class attribute
0 commit comments