Closed
Description
The attributes __qualname__
and __module__
appear to be accessible from within a class body. These accesses don't generate a runtime error, but mypy reports a "not defined" error.
class Foo:
print(__doc__)
print(__name__)
print(__qualname__) # error: Name '__qualname__' is not defined
print(__module__) # error: Name '__module__' is not defined
This is related to the following bug filed against pyright: microsoft/pylance-release#1376.