Fixit ExtraΒΆ
Additional Fixit-derived rules that can be enabled separately.
Enable with:
enable = ["fixit-extra"]
Rule |
Message |
Python |
Autofix |
|---|---|---|---|
Multiple isinstance calls with the same target but different types can be collapsed into a single call with a tuple of types. |
Any |
No |
|
|
Any |
Yes |
|
Remove the redundant |
Any |
Yes |
|
Use |
Any |
No |
|
Call |
Any |
No |
|
Remove the |
Any |
Yes |
|
The lambda that wraps {function} is redundant and can be replaced by the callable. |
Any |
No |
|
Unnecessary list comprehension inside {func}(). Use a generator expression instead. |
Any |
No |
|
Remove the quotes from this annotation; postponed evaluation is already enabled. |
Any |
Yes |
|
|
Any |
No |
|
Use |
Any |
Yes |
|
Use |
Any |
Yes |
|
Use |
Any |
Yes |
|
Do not call blocking time.sleep inside async functions; use asyncio.sleep or an async runtime sleep. |
Any |
No |
|
When using @classmethod, the first argument must be |
Any |
Yes |
|
Import abstract base classes from |
|
Yes |
|
Replace this {func}() call with the equivalent comprehension. |
Any |
No |
|
Use |
Any |
Yes |
|
Use an f-string instead of |
Any |
Yes |
|
Compare |
Any |
Yes |
|
Replace this {func}() call with the equivalent collection literal. |
Any |
Yes |