Skip to content

Commit 66cbaf5

Browse files
committed
Formatting improvements
1 parent 228cc3f commit 66cbaf5

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

mypy/checker.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
class Frame(Dict[Any, Type]):
6464
pass
6565

66+
6667
class Key(AnyType):
6768
pass
6869

@@ -78,8 +79,8 @@ def __init__(self) -> None:
7879

7980
# For frames higher in the stack, we record the set of
8081
# Frames that can escape there
81-
self.options_on_return = [] # type: List[List[Frame]]
82-
82+
self.options_on_return = [] # type: List[List[Frame]]
83+
8384
# Maps expr.literal_hash] to get_declaration(expr)
8485
# for every expr stored in the binder
8586
self.declarations = Frame()
@@ -181,9 +182,7 @@ def update_from_options(self, frames: List[Frame]) -> bool:
181182
def pop_frame(self, fall_through: int = 0) -> Frame:
182183
"""Pop a frame and return it.
183184
184-
If fall_through > 0, then on __exit__ the manager will clear the
185-
breaking_out flag, and if it was not set, will allow the frame
186-
to escape to its ancestor `fall_through` levels higher.
185+
See frame_context() for documentation of fall_through.
187186
"""
188187
if fall_through and not self.breaking_out:
189188
self.allow_jump(-fall_through)
@@ -276,7 +275,7 @@ def allow_jump(self, index: int) -> None:
276275
self.options_on_return[index].append(frame)
277276

278277
def push_loop_frame(self) -> None:
279-
self.loop_frames.append(len(self.frames)-1)
278+
self.loop_frames.append(len(self.frames) - 1)
280279

281280
def pop_loop_frame(self) -> None:
282281
self.loop_frames.pop()
@@ -285,9 +284,8 @@ def pop_loop_frame(self) -> None:
285284
def frame_context(self, fall_through: int = 0) -> Iterator[Frame]:
286285
"""Return a context manager that pushes/pops frames on enter/exit.
287286
288-
If fall_through > 0, then on __exit__ the manager will clear the
289-
breaking_out flag, and if it was not set, will allow the frame
290-
to escape to its ancestor `fall_through` levels higher.
287+
If fall_through > 0, then it will allow the frame to escape to
288+
its ancestor `fall_through` levels higher.
291289
"""
292290
yield self.push_frame()
293291
self.pop_frame(fall_through)

0 commit comments

Comments
 (0)