From aaae8c2e8ba187d1375a8883404637a373e47eb4 Mon Sep 17 00:00:00 2001 From: Oleh Krehel Date: Mon, 20 Mar 2023 21:03:05 +0100 Subject: [PATCH] coverage/html.py: Fix linting and mypy errors --- coverage/html.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/coverage/html.py b/coverage/html.py index 6e249ff55..daf8f6aa6 100644 --- a/coverage/html.py +++ b/coverage/html.py @@ -10,7 +10,6 @@ import os import re import shutil -import json from collections import Counter from dataclasses import dataclass @@ -83,6 +82,7 @@ class LineData: contexts: List[str] contexts_label: str context_list: List[str] + context_str: Optional[str] = None short_annotations: List[str] long_annotations: List[str] html: str = "" @@ -387,7 +387,8 @@ def write_html_file(self, ftr: FileToReport, prev_html: str, next_html: str) -> ) ldata.html = ''.join(html_parts) - ldata.context_str = ",".join(str(context_codes[c_context]) for c_context in ldata.context_list) + ldata.context_str = ",".join( + str(context_codes[c_context]) for c_context in ldata.context_list) if ldata.short_annotations: # 202F is NARROW NO-BREAK SPACE.