-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
enhancement requestNew feature or requestNew feature or request
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.
kennipj and povilasb
Metadata
Metadata
Assignees
Labels
enhancement requestNew feature or requestNew feature or request

