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
Adjustment: Should not be applied to getattr and other alike
Explanation
getattr can't be used with keyword arguments and will throw TypeError: getattr() takes no keyword arguments if tried to be used as such.
The same applies to functions defined as as positional only (by using / in the arguments), which might make it impossible to use keyword arguments. This case is not easy to workaround though, but getattr and other official apis alike should probably be excluded from the rule.
Example
The text was updated successfully, but these errors were encountered:
With the current way I receive the AST there is no practical way to detect positional-only arguments. I moved the rule to https://github.com/MartinThoma/flake8-scream as that project is allowed to have false-positives.
Desired change
getattr
and other alikeExplanation
getattr
can't be used with keyword arguments and will throwTypeError: getattr() takes no keyword arguments
if tried to be used as such.The same applies to functions defined as as positional only (by using
/
in the arguments), which might make it impossible to use keyword arguments. This case is not easy to workaround though, butgetattr
and other official apis alike should probably be excluded from the rule.Example
The text was updated successfully, but these errors were encountered: