Fixit¶
Core lint rules inherited from Fixit.
Enable with:
enable = ["fixit"]
Rule |
Message |
Python |
Autofix |
|---|---|---|---|
Dataclass mutability must be explicit. Add |
Any |
No |
|
Instead of NamedTuple, consider using the @dataclass decorator from dataclasses instead for simplicity, efficiency and consistency. |
Any |
Yes |
|
Your if condition appears to evaluate to a static value (e.g. |
Any |
No |
|
It appears you are using the @sorted-attributes directive and the class variables are unsorted. See the lint autofix suggestion. |
Any |
Yes |
|
Use Callable[…, T] instead of Callable[[…], T]. |
Any |
Yes |
|
noqa is deprecated. Use |
Any |
No |
|
You are using builtins.{builtin_type} as a type annotation but the type system doesn’t recognize it as a valid type. Use typing.{correct_type} instead. |
|
Yes |