unnecessary-dict-kwargs (PIE804)
Derived from the flake8-pie linter.
Fix is sometimes available.
What it does
Checks for unnecessary dict
kwargs.
Why is this bad?
If the dict
keys are valid identifiers, they can be passed as keyword
arguments directly.
Example
Use instead:
Fix safety
This rule's fix is marked as unsafe for dictionaries with comments interleaved between the items, as comments may be removed.
For example, the fix would be marked as unsafe in the following case:
as this is converted to foo(x=1.0, y=2.0)
without any of the comments.