Replies: 1 comment 1 reply
-
Add if not TYPE_CHECKING to wrap getattr.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have been creating a proxy class that uses dynamic base hierarchy to pass along the type information like so:
The problem is that
__getattr__
makes anything in Pyright pass and it doesn't do any sensible type checking.I'd ilke to exclude
__getattr__
from it's analysis and have it rely on the types of the base class that I dynamically set based onTYPE_CHECKING
.I have tried
# pyright: ignore
but that doesn't seem to do anything.Beta Was this translation helpful? Give feedback.
All reactions