From 53b996731fdfefb8c5133ca4b4e64870c9cfe120 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..23fba3f0a 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 @@ -86,6 +85,7 @@ class LineData: short_annotations: List[str] long_annotations: List[str] html: str = "" + context_str: Optional[str] = None annotate: Optional[str] = None annotate_long: Optional[str] = None css_class: 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.