8000 cleanups · python/mypy@ba7af85 · GitHub
[go: up one dir, main page]

Skip to content

Commit ba7af85

Browse files
committed
cleanups
1 parent 8add344 commit ba7af85

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
@@ -578,6 +578,14 @@ def foo() -> None:
578578
return
579579
y = x + 'asdad'
580580

581+
def bar() -> None:
582+
x = 1 # type: Union[int, str]
583+
if isinstance(x, int):
584+
return
585+
else:
586+
pass
587+
y = x + 'asdad'
588+
581589
foo()
582590
[builtins fixtures/isinstancelist.py]
583591
[case testIsInstanceBadBreak]

0 commit comments

Comments
 (0)
0