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 48ed840 commit 8eafabaCopy full SHA for 8eafaba
test-data/unit/check-typeguard.test
@@ -740,6 +740,15 @@ class E:
740
def __call__(self, o: object) -> TypeGuard[int]:
741
return True
742
x = object()
743
+if E()(x):
744
+ reveal_type(x) # N: Revealed type is "builtins.int"
745
+[case testNoCrashOnDunderCallTypeIsTemporaryObject]
746
+from typing_extensions import TypeIs
747
+class E:
748
+ def __init__(self) -> None: ...
749
+ def __call__(self, o: object) -> TypeIs[int]:
750
+ return True
751
+x = object()
752
if E()(x):
753
reveal_type(x) # N: Revealed type is "builtins.int"
754
[builtins fixtures/tuple.pyi]
0 commit comments