-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
C: undefined-variableIssues related to 'undefined-variable' checkIssues related to 'undefined-variable' checkFalse Positive 🦟A message is emitted but nothing is wrong with the codeA message is emitted but nothing is wrong with the codeNeeds PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementation
Description
Bug description
Hello,
The following raise an unexpected warning.
from __future__ import annotations
class A:
class B:
pass
class C:
b: B # undefined-variable
In Python 3.9, Pylint should not raise the undefined-variable
warning on B
if __future__.annotations
has been imported.
Have a good day !
Configuration
No response
Command used
no specific parameters
Pylint output
E0602: Undefined variable 'B' (undefined-variable)
Expected behavior
No warning
Pylint version
pylint 2.16.0
astroid 2.14.1
Python 3.9.2 (default, Feb 28 2021, 17:03:44)
OS / Environment
Debian bullseye 64bit
Additional dependencies
No response
jacobtylerwalls
Metadata
Metadata
Assignees
Labels
C: undefined-variableIssues related to 'undefined-variable' checkIssues related to 'undefined-variable' checkFalse Positive 🦟A message is emitted but nothing is wrong with the codeA message is emitted but nothing is wrong with the codeNeeds PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementation