-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Enhancement/add checker consider using min max builtin #4359
Enhancement/add checker consider using min max builtin #4359
Conversation
Almost all of the changes here are from previous commits to #3406 by user manderj. I mostly just polished it up and got the test cases working with test_functional.py and they seem to pass now. Is this a big enough change that Step 3 (doc/whatsnew/<current release.rst>) needs to be be done too? |
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 change and good functional tests, I left some remarks (that will requires to regenerate the output of functional test) but I'd merge this.
Co-authored-by: Pierre Sassoulas <[email protected]>
The broadest type should be astroid.If since _check_consider_using_min_max_builtin is only called by visit_if. This aligns with what I saw at runtime.
I think I'm good with this as it stands. @Pierre-Sassoulas do you have or know who has write access and can merge? |
Thank you for this new checker, it will be included in the next version that we'll release soonish :) |
Steps
doc/whatsnew/<current release.rst>
.Description
Adds a warning to replace code like
with its respective
Type of Changes
Related Issue
Closes #3406