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.
1 parent 2285e91 commit 77b9fe7Copy full SHA for 77b9fe7
test-data/unit/check-classes.test
@@ -8781,8 +8781,19 @@ C().bar = "fine"
8781
[builtins fixtures/property.pyi]
8782
8783
[case testCorrectConstructorTypeWithAnyFallback]
8784
+from typing import Generic, TypeVar
8785
+
8786
class B(Unknown): # type: ignore
8787
def __init__(self) -> None: ...
8788
class C(B): ...
8789
8790
reveal_type(C) # N: Revealed type is "def () -> __main__.C"
8791
8792
+T = TypeVar("T")
8793
+class BG(Generic[T], Unknown): # type: ignore
8794
+ def __init__(self) -> None: ...
8795
+class CGI(BG[int]): ...
8796
+class CGT(BG[T]): ...
8797
8798
+reveal_type(CGI) # N: Revealed type is "def () -> __main__.CGI"
8799
+reveal_type(CGT) # N: Revealed type is "def [T] () -> __main__.CGT[T`1]"
0 commit comments