Skip to content

Commit 8141d73

Browse files
committed
Fix iterator exhaustion
1 parent 767a886 commit 8141d73

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mypy/errors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -631,10 +631,10 @@ def add_error_info(self, info: ErrorInfo) -> None:
631631
# Annotation requests us to ignore all errors on this line.
632632
self.used_ignored_lines[file][scope_line].append(err_code.code)
633633
return
634+
if file in self.skipped_lines and scope_line in self.skipped_lines[file]:
635+
return
634636
if file in self.ignored_files:
635637
return
636-
if file in self.skipped_lines and set(lines) <= self.skipped_lines[file]:
637-
return
638638
if info.only_once:
639639
if info.message in self.only_once_messages:
640640
return

0 commit comments

Comments
 (0)