Skip to content

Commit aae93d6

Browse files
committed
Ignore type-errors related to attr.asdict
1 parent 71b79fc commit aae93d6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/_pytest/reports.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -455,15 +455,15 @@ def _report_to_json(report: BaseReport) -> Dict[str, Any]:
455455
def serialize_repr_entry(
456456
entry: Union[ReprEntry, ReprEntryNative]
457457
) -> Dict[str, Any]:
458-
data = attr.asdict(entry)
458+
data = attr.asdict(entry) # type:ignore[arg-type]
459459
for key, value in data.items():
460460
if hasattr(value, "__dict__"):
461461
data[key] = attr.asdict(value)
462462
entry_data = {"type": type(entry).__name__, "data": data}
463463
return entry_data
464464

465465
def serialize_repr_traceback(reprtraceback: ReprTraceback) -> Dict[str, Any]:
466-
result = attr.asdict(reprtraceback)
466+
result = attr.asdict(reprtraceback) # type:ignore[arg-type]
467467
result["reprentries"] = [
468468
serialize_repr_entry(x) for x in reprtraceback.reprentries
469469
]
@@ -473,7 +473,7 @@ def serialize_repr_crash(
473473
reprcrash: Optional[ReprFileLocation],
474474
) -> Optional[Dict[str, Any]]:
475475
if reprcrash is not None:
476-
return attr.asdict(reprcrash)
476+
return attr.asdict(reprcrash) # type:ignore[arg-type]
477477
else:
478478
return None
479479

0 commit comments

Comments
 (0)