Closed
Description
Is your feature request related to a problem? Please describe.
A clear and concise description of the problem.
__orig_bases__
is defined in PEP 560. Currently pyright does not infer the type of cls.__orig_bases__
. For example,
from typing import Generic, TypeVar
T = TypeVar('T')
class Base(Generic[T]):
pass
class Derived(Base[int]):
pass
Derived.__orig_bases__
Hovering on the Derived.__orig_bases__
shows:
And the value of Derived.__orig_bases__
is (__main__.Base[int],)
Describe the solution you'd like
A clear and concise description of what you want to happen.
This feature is helpful for writing type reflection code. Would be great if inferring the type of cls.__orig_bases__
is supported.
Additional context
Add any other context or screenshots about the feature request here.