-
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
repeated-isinstance-calls
is a duplicate rule of duplicate-isinstance-call
#8122
Comments
repeated-isinstance-calls
is duplicate of duplicate-isinstance-call
repeated-isinstance-calls
is a duplicate rule of duplicate-isinstance-call
I prefer the original logic that always converted the isinstance call to check against a type tuple. While the new Union logic is really snazzy in Python 3.11, it is a little bit slower in practice and having the pyupgrade rule take care of it means we can opt out of it which is not possible with the PyLint check |
Thanks, will dedupe! |
@charliermarsh do we want to deprecate one of them? which one? |
@zanieb - I'd vote to keep the |
Resolved in #12021 |
These two rules do the exact same thing but, have slightly different logic. They should be an alias of one another but appear to each be there own rule:
https://docs.astral.sh/ruff/rules/repeated-isinstance-calls/ and https://docs.astral.sh/ruff/rules/duplicate-isinstance-call/ do the same thing, and have the same autofix implemented. Seems like this wasn't notice when the PR was merged #4792
The text was updated successfully, but these errors were encountered: