Open
Description
Bug description
from __future__ import annotations
def foo():
class Foo:
def foo(self) -> Foo: # E0602:undefined-variable
...
class Bar:
def foo(self) -> Bar: # no error
...
Configuration
No response
Command used
pylint a.py
Pylint output
************* Module a
a.py:6:25: E0602: Undefined variable 'Foo' (undefined-variable)
-----------------------------------
Expected behavior
no error
Pylint version
pylint 2.16.0b1
astroid 2.14.0-dev0
Python 3.11.1 (tags/v3.11.1:a7a450f, Dec 6 2022, 19:58:39) [MSC v.1934 64 bit (AMD64)]
OS / Environment
No response
Additional dependencies
No response