-
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
] Also reports case np.nan
/case math.nan
(PLW0177
)
#16378
Conversation
|
@ntBre could you take a look at this PR? |
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.
Thanks for your work on this and for the clarification on my match
comments! I left a slightly different implementation strategy suggestion for your consideration, but I'm happy with this one too if you are.
ed1e215
to
92b819c
Compare
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.
Nice, thanks!
Summary
Resolves #16374.
PLW0177
now also reports the pattern of a case branch if it is an attribute access whose qualified name is that of eithernp.nan
ormath.nan
.As the rule is in preview, the changes are not preview-gated.
Test Plan
cargo nextest run
andcargo insta test
.