diff --git a/floss/render/default.py b/floss/render/default.py index eedc46f3f..a3d7aa097 100644 --- a/floss/render/default.py +++ b/floss/render/default.py @@ -315,7 +315,7 @@ def get_color(color): def render(results: floss.results.ResultDocument, verbose, disable_headers, color): - sys.__stdout__.reconfigure(encoding="utf-8") + sys.__stdout__.reconfigure(encoding="utf-8") # type: ignore [union-attr] console = Console(file=io.StringIO(), color_system=get_color(color), highlight=False, soft_wrap=True) if not disable_headers: diff --git a/floss/render/json.py b/floss/render/json.py index d3e87b391..d95900538 100644 --- a/floss/render/json.py +++ b/floss/render/json.py @@ -17,7 +17,7 @@ class FlossJSONEncoder(json.JSONEncoder): def default(self, o): if dataclasses.is_dataclass(o): - return dataclasses.asdict(o) + return dataclasses.asdict(o) # type: ignore [arg-type] if isinstance(o, datetime.datetime): return o.isoformat("T") + "Z" return super().default(o) diff --git a/tests/conftest.py b/tests/conftest.py index 9d4022e5d..cfb1fa2c1 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -154,7 +154,7 @@ def runtest(self): def reportinfo(self): return self.path, 0, "usecase: %s" % self.name - def repr_failure(self, excinfo): + def repr_failure(self, excinfo): # type: ignore [override] if isinstance(excinfo.value, FLOSSStringsNotExtracted): expected = excinfo.value.expected got = excinfo.value.got