Skip to content

Commit 8bafc26

Browse files
committed
cleanups
1 parent 57921b5 commit 8bafc26

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

mypy/checker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ def is_implicit_any(t: Type) -> bool:
741741
self.accept(init)
742742

743743
# Type check body in a new scope.
744-
with self.binder.frame_context(1):
744+
with self.binder.frame_context():
745745
self.accept(item.body)
746746

747747
self.return_types.pop()

test-data/unit/check-isinstance.test

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,14 @@ def foo() -> None:
580580
return
581581
y = x + 'asdad'
582582

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+
583591
foo()
584592
[builtins fixtures/isinstancelist.py]
585593
[case testIsInstanceBadBreak]

0 commit comments

Comments
 (0)