Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f74831c

Browse files
authored
Always show INTERNAL ERROR (#216)
1 parent baa7865 commit f74831c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

mypy_primer/model.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,11 @@ def canonicalise(line: str) -> str:
540540
# mypy's output appears to be nondeterministic for some same line errors, e.g. on pypa/pip
541541
# Work around that by ignoring identical removal and addition pairs, e.g.
542542
# "- a.py:1: error xyz" and "+ a.py:1: error xyz"
543-
diff_lines = [line for line in d.compare(old_lines, new_lines) if line[0] in ("+", "-")]
543+
diff_lines = [
544+
line
545+
for line in d.compare(old_lines, new_lines)
546+
if line[0] in ("+", "-") or "INTERNAL ERROR" in line
547+
]
544548
net_change: dict[str, int] = defaultdict(int)
545549
for line in diff_lines:
546550
cline = canonicalise(line)

0 commit comments

Comments
 (0)