-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pylint
] Detect nested methods correctly (PLW1641
)
#15032
Conversation
|
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
PLW1641 | 3 | 3 | 0 | 0 | 0 |
I'm a bit concerned about special casing this behavior only for I wonder if we could make this more reusable so that all class method rules could profit from it. Although I'm not quiet sure how to do that. For example, we could create a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I refactored your code and introduced a reusable any_member_declaration
as discussed in the PR before. The reason why I prefer having this helper is that it now can be used for other rules as well. For example, too many public methods could make use of it, resulting in more consistent behavior across our rules.
Thank you |
Summary
Resolves #14882.
Test Plan
cargo nextest run
andcargo insta test
.