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
PLR0917 counts the number of non-keyword-only arguments and checks whether the number is above max-positional-args. This count includes self and cls in methods and class-methods, but I feel like those shouldn't count because they are passed in implicitly.
I'd be willing to make the code change if this is acceptable.
The text was updated successfully, but these errors were encountered:
…9563)
## Summary
This PR detects whether PLR0917 is being applied to a method or class
method, and if so, it ignores the first argument for the purposes of
counting the number of positional arguments.
## Test Plan
New tests have been added to the corresponding fixture.
Closes#9552.
PLR0917 counts the number of non-keyword-only arguments and checks whether the number is above
max-positional-args
. This count includesself
andcls
in methods and class-methods, but I feel like those shouldn't count because they are passed in implicitly.I'd be willing to make the code change if this is acceptable.
The text was updated successfully, but these errors were encountered: