Skip to content

Commit bb465c1

Browse files
Some fixes
1 parent 109657e commit bb465c1

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,12 @@ version-file = "src/pytest_html/__version.py"
9696
path = "scripts/npm.py"
9797

9898
[tool.mypy]
99-
check_untyped_defs = false # TODO
99+
check_untyped_defs = false # TODO
100100
disallow_any_generics = true
101101
disallow_incomplete_defs = true
102102
disallow_untyped_calls = true
103-
disallow_untyped_decorators = true
104-
disallow_untyped_defs = false # TODO
103+
disallow_untyped_decorators = false # TODO
104+
disallow_untyped_defs = false # TODO
105105
ignore_missing_imports = true
106106
no_implicit_optional = true
107107
no_implicit_reexport = true

src/pytest_html/basereport.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ def __init__(
4747
config.getini("max_asset_filename_length")
4848
)
4949

50-
self._reports: DefaultDict = defaultdict(dict)
50+
self._reports: DefaultDict = defaultdict(dict) # type: ignore
5151
self._report: ReportData = report_data
52-
self._report.title: str = self._report_path.name
52+
self._report.title = self._report_path.name
5353
self._suite_start_time: float = time.time()
5454

5555
@property
@@ -88,7 +88,7 @@ def _generate_report(self, self_contained: bool = False) -> None:
8888

8989
self._write_report(rendered_report)
9090

91-
def _generate_environment(self) -> dict[str, Any]:
91+
def _generate_environment(self) -> Any:
9292
try:
9393
from pytest_metadata.plugin import metadata_key
9494

@@ -117,10 +117,10 @@ def _is_redactable_environment_variable(self, environment_variable: str) -> bool
117117

118118
return False
119119

120-
def _data_content(self, *args, **kwargs) -> None:
120+
def _data_content(self, *args, **kwargs): # type: ignore[no-untyped-def]
121121
pass
122122

123-
def _media_content(self, *args, **kwargs) -> None:
123+
def _media_content(self, *args, **kwargs): # type: ignore[no-untyped-def]
124124
pass
125125

126126
def _process_extras(self, report: CollectReport, test_id: str) -> list[Any]:
@@ -136,19 +136,19 @@ def _process_extras(self, report: CollectReport, test_id: str) -> list[Any]:
136136
)
137137
if extra["format_type"] == extras.FORMAT_JSON:
138138
content = json.dumps(content)
139-
extra["content"] = self._data_content(
139+
extra["content"] = self._data_content( # type: ignore[no-untyped-call]
140140
content, asset_name=asset_name, mime_type=extra["mime_type"]
141141
)
142142

143143
if extra["format_type"] == extras.FORMAT_TEXT:
144144
if isinstance(content, bytes):
145145
content = content.decode("utf-8")
146-
extra["content"] = self._data_content(
146+
extra["content"] = self._data_content( # type: ignore[no-untyped-call]
147147
content, asset_name=asset_name, mime_type=extra["mime_type"]
148148
)
149149

150150
if extra["format_type"] in [extras.FORMAT_IMAGE, extras.FORMAT_VIDEO]:
151-
extra["content"] = self._media_content(
151+
extra["content"] = self._media_content( # type: ignore[no-untyped-call]
152152
content, asset_name=asset_name, mime_type=extra["mime_type"]
153153
)
154154

0 commit comments

Comments
 (0)