Skip to content

Commit 2b53266

Browse files
tharvikgvanrossum
authored andcommitted
explicit type got from dict.get (#1576)
1 parent e45ac10 commit 2b53266

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

mypy/checker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def pop_frame(self, canskip=True, fallthrough=False) -> Tuple[bool, Frame]:
204204
"""
205205
result = self.frames.pop()
206206

207-
options = self.frames_on_escape.pop(len(self.frames) - 1, [])
207+
options = self.frames_on_escape.pop(len(self.frames) - 1, []) # type: List[Frame]
208208
if canskip:
209209
options.append(self.frames[-1])
210210
if fallthrough:

mypy/solve.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def solve_constraints(vars: List[int], constraints: List[Constraint],
2323
# Collect a list of constraints for each type variable.
2424
cmap = {} # type: Dict[int, List[Constraint]]
2525
for con in constraints:
26-
a = cmap.get(con.type_var, [])
26+
a = cmap.get(con.type_var, []) # type: List[Constraint]
2727
a.append(con)
2828
cmap[con.type_var] = a
2929

0 commit comments

Comments
 (0)