Skip to content
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

False negatives with Python3.13 #478

Open
samueljsb opened this issue Aug 1, 2024 · 0 comments
Open

False negatives with Python3.13 #478

samueljsb opened this issue Aug 1, 2024 · 0 comments

Comments

@samueljsb
Copy link
Contributor

I am seeing lines that were previously flagged as violating rules not being reported when fixit is run with Python3.13.

# t.py
x = None
isinstance(x, str) or isinstance(x, int)
$ python --version --version
Python 3.13.0rc1 (v3.13.0rc1:e4a3e786a5e, Jul 31 2024, 19:49:53) [Clang 15.0.0 (clang-1500.3.9.4)]

$ fixit --version
fixit, version 2.1.0

$ fixit --rules fixit.rules:CollapseIsinstanceChecks lint t.py
🧼 1 file clean 🧼

When installed with python3.12 or earlier, this reports a violation of the rule:

$ python --version --version
Python 3.12.0 (v3.12.0:0fb18b02c8, Oct  2 2023, 09:45:56) [Clang 13.0.0 (clang-1300.0.29.30)]

$ fixit --version
fixit, version 2.1.0

$ fixit --rules fixit.rules:CollapseIsinstanceChecks lint t.py
t.py@3:0 CollapseIsinstanceChecks: Multiple isinstance calls with the same target but different types can be collapsed into a single call with a tuple of types. (has autofix)
🛠️  1 file checked, 1 file with errors, 1 auto-fix available 🛠️

I haven't checked any other rules, but am happy to do so if that would be helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant