-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add support for Python 3.12 #143
Conversation
With pycodestyle 2.11, comparing types with `is` is no longer an error: PyCQA/pycodestyle#1084
pycodestyle 2.11 no longer reports E741 - ambiguous variable name for `if l == True` because it doesn't contain an assignment. PyCQA/pycodestyle#1118
Thank you for contributing! 👋 |
Thank you for contributing! 👋 Since this changes the Coding Conventions, I'll @-mention the appropriate NI engineers. |
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 the update!
The "conventions change" is just updating an example to something will be flagged with changes to pycodestyle. No effective change. |
What does this Pull Request accomplish?
Update version constraints to use
flake8 = "^6.1"
andpycodestyle = "^2.11"
for Python 3.12 and later. The enhanced f-string support in Python 3.12 changed how theast
module parses f-strings, which required updates topycodestyle
.Fix test failures introduced by the update:
flake8
no longer tolerates inline comments in theignore
field. Comments and error numbers must be on separate lines.pycodestyle
no longer reports "E721 do not compare types, use 'isinstance()'" for comparisons that use theis
operator.pycodestyle
no longer reports "E741 ambiguous variable name" when using the variable; it only reports this error when assigning the variable.Update PR workflow to test with Python 3.12.
Why should this Pull Request be merged?
Fixes #142
What testing has been done?
Ran
poetry run pytest -v
with both Python 3.9.13 and 3.12.0.