We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
__orig_class__
1 parent 61595bd commit 1ac8499Copy full SHA for 1ac8499
basedtyping/__init__.py
@@ -260,7 +260,7 @@ class ReifiedGeneric(
260
261
>>> class Foo(ReifiedGeneric[T]):
262
... def create_instance(self) -> T:
263
- ... cls = self.__orig_class__.__args__[0]
+ ... cls = self.__reified_generics__[0]
264
... return cls()
265
...
266
... foo: Foo[int] = Foo() # error: generic cannot be reified
tests/test_reified_generics/test_reified_generic.py
@@ -57,7 +57,6 @@ def __init__(self) -> None:
57
assert self.__reified_generics__ == (int,)
58
59
Foo[int]()
60
- assert not hasattr(Foo, "__orig_class__")
61
62
63
def test_concrete_subclass() -> None:
0 commit comments