Skip to content

Commit c0334e4

Browse files
committed
Minor tweaks
Closes #500.
1 parent 5cb9a16 commit c0334e4

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

mypy/parse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1568,7 +1568,7 @@ def expect_colon_and_break(self) -> Tuple[Token, Token]:
15681568

15691569
def expect_break(self) -> Token:
15701570
token = self.expect_type(Break)
1571-
if re.match(self.type_ignore_exp, token.pre):
1571+
if self.type_ignore_exp.match(token.pre):
15721572
self.ignored_lines.add(token.line)
15731573
return token
15741574

mypy/semanal.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ def visit_file(self, file_node: MypyFile, fnam: str) -> None:
164164
if self.cur_mod_id == 'builtins':
165165
remove_imported_names_from_symtable(self.globals, 'builtins')
166166

167+
self.errors.set_ignored_lines(set())
168+
167169
def visit_func_def(self, defn: FuncDef) -> None:
168170
self.errors.push_function(defn.name())
169171
self.update_function_type_variables(defn)

0 commit comments

Comments
 (0)