Fixit¶
Core lint rules inherited from Fixit.
Enable with:
enable = ["fixit"]
Rule |
Message |
Python |
Autofix |
|---|---|---|---|
Dataclass mutability must be explicit. Add |
Any |
No |
|
NamedTuple can often be replaced with @dataclass, but dataclasses are not tuple-compatible; check callers before converting. |
Any |
No |
|
Your if condition appears to evaluate to a static value (e.g. |
Any |
No |
|
Class assignments under @sorted-attributes are not sorted; sorting them can change right-hand-side side-effect order. |
Any |
Yes |
|
Use Callable[…, T] instead of Callable[[…], T]. |
Any |
Yes |
|
noqa is deprecated. Use |
Any |
No |
|
For Python < 3.9, builtins.{builtin_type} is used as a type annotation but the type system doesn’t recognize it as a valid type. Use typing.{correct_type} instead. |
|
Yes |