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 57921b5 commit 8bafc26Copy full SHA for 8bafc26
mypy/checker.py
@@ -741,7 +741,7 @@ def is_implicit_any(t: Type) -> bool:
741
self.accept(init)
742
743
# Type check body in a new scope.
744
- with self.binder.frame_context(1):
+ with self.binder.frame_context():
745
self.accept(item.body)
746
747
self.return_types.pop()
test-data/unit/check-isinstance.test
@@ -580,6 +580,14 @@ def foo() -> None:
580
return
581
y = x + 'asdad'
582
583
+def bar() -> None:
584
+ x = 1 # type: Union[int, str]
585
+ if isinstance(x, int):
586
+ return
587
+ else:
588
+ pass
589
+ y = x + 'asdad'
590
+
591
foo()
592
[builtins fixtures/isinstancelist.py]
593
[case testIsInstanceBadBreak]
0 commit comments