Skip to content

Commit d7761e4

Browse files
ilinumgvanrossum
authored andcommitted
Fix crash with unanalyzed branches and old-html report (#3782)
1 parent c446d21 commit d7761e4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mypy/stats.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,8 @@ def generate_html_report(tree: MypyFile, path: str, type_map: Dict[Expression, T
332332
status = visitor.line_map.get(lineno, TYPE_PRECISE)
333333
style_map = {TYPE_PRECISE: 'white',
334334
TYPE_IMPRECISE: 'yellow',
335-
TYPE_ANY: 'red'}
335+
TYPE_ANY: 'red',
336+
TYPE_UNANALYZED: 'red'}
336337
style = style_map[status]
337338
append('<span class="lineno">%4d</span> ' % lineno +
338339
'<span class="%s">%s</span>' % (style,

0 commit comments

Comments
 (0)