From 90e1456999332156a209c2dd9b1d1e4eb8aa3e41 Mon Sep 17 00:00:00 2001 From: Svyatoslav Ilinskiy Date: Mon, 31 Jul 2017 10:53:34 -0700 Subject: [PATCH] Fix crash with unanalyzed branches and old-html report --- mypy/stats.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mypy/stats.py b/mypy/stats.py index ffa171367529..a6a80be60bf2 100644 --- a/mypy/stats.py +++ b/mypy/stats.py @@ -332,7 +332,8 @@ def generate_html_report(tree: MypyFile, path: str, type_map: Dict[Expression, T status = visitor.line_map.get(lineno, TYPE_PRECISE) style_map = {TYPE_PRECISE: 'white', TYPE_IMPRECISE: 'yellow', - TYPE_ANY: 'red'} + TYPE_ANY: 'red', + TYPE_UNANALYZED: 'red'} style = style_map[status] append('%4d ' % lineno + '%s' % (style,