-
-
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
Undefined variable when using generic type parameters (PEP695) #9193
Labels
C: undefined-variable
Issues related to 'undefined-variable' check
False Positive 🦟
A message is emitted but nothing is wrong with the code
python 3.12
Milestone
Comments
Manitary
added
the
Needs triage 📥
Just created, needs acknowledgment, triage, and proper labelling
label
Oct 25, 2023
jacobtylerwalls
added
False Positive 🦟
A message is emitted but nothing is wrong with the code
python 3.12
and removed
Needs triage 📥
Just created, needs acknowledgment, triage, and proper labelling
labels
Oct 28, 2023
jacobtylerwalls
added
C: undefined-variable
Issues related to 'undefined-variable' check
Needs astroid update
Needs an astroid update (probably a release too) before being mergable
labels
Oct 28, 2023
This was referenced Oct 28, 2023
jacobtylerwalls
removed
the
Needs astroid update
Needs an astroid update (probably a release too) before being mergable
label
Oct 28, 2023
netbsd-srcmastr
pushed a commit
to NetBSD/pkgsrc
that referenced
this issue
Feb 25, 2024
Include PEP 695 (Python 3.12) generic type syntax nodes in get_children(), allowing checkers to visit them. Refs pylint-dev/pylint#9193 Add __main__ as a possible inferred value for __name__ to improve control flow inference around if __name__ == "__main__": guards. Closes #2071 Following a deprecation period, the names arg to the Import constructor and the op arg to the BoolOp constructor are now required, and the doc args to the PartialFunction and Property constructors have been removed (call postinit(doc_node=...) instead.) Following a deprecation announced in astroid 1.5.0, the alias AstroidBuildingException is removed in favor of AstroidBuildingError. Include modname in AST warnings. Useful for invalid escape sequence warnings with Python 3.12. RecursionError is now trapped and logged out as UserWarning during astroid node transformations with instructions about raising the system recursion limit. Closes pylint-dev/pylint#8842 Suppress SyntaxWarning for invalid escape sequences on Python 3.12 when parsing modules. Closes pylint-dev/pylint#9322
Could be due to parallélisation that brings worse inférence if you analyse only some of the files (can't link to thé faq in the doc as I'm on mobile, sorry) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C: undefined-variable
Issues related to 'undefined-variable' check
False Positive 🦟
A message is emitted but nothing is wrong with the code
python 3.12
Bug description
The behaviour described in #9110 is still observable with pylint 3.0.2:
works fine but
T
is marked as undefined variableConfiguration
No response
Command used
pylint .\mwe.py
Pylint output
Expected behavior
There should be no E0602, E0602, W0612.
Pylint version
OS / Environment
OS: Win32NT (10.0.19045.0)
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: