Skip to content

Commit

Permalink
mypy ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-tz committed Nov 11, 2024
1 parent 9c896eb commit 5225981
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ lib/

# Pyenv file
.python-version
.venv

# Test executables
bin/
Expand Down
2 changes: 1 addition & 1 deletion floss/render/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion floss/render/json.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5225981

Please sign in to comment.