Ignore type-errors related to attr.asdict
This commit is contained in:
parent
71b79fcda5
commit
aae93d6127
|
@ -455,7 +455,7 @@ def _report_to_json(report: BaseReport) -> Dict[str, Any]:
|
||||||
def serialize_repr_entry(
|
def serialize_repr_entry(
|
||||||
entry: Union[ReprEntry, ReprEntryNative]
|
entry: Union[ReprEntry, ReprEntryNative]
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
data = attr.asdict(entry)
|
data = attr.asdict(entry) # type:ignore[arg-type]
|
||||||
for key, value in data.items():
|
for key, value in data.items():
|
||||||
if hasattr(value, "__dict__"):
|
if hasattr(value, "__dict__"):
|
||||||
data[key] = attr.asdict(value)
|
data[key] = attr.asdict(value)
|
||||||
|
@ -463,7 +463,7 @@ def _report_to_json(report: BaseReport) -> Dict[str, Any]:
|
||||||
return entry_data
|
return entry_data
|
||||||
|
|
||||||
def serialize_repr_traceback(reprtraceback: ReprTraceback) -> Dict[str, Any]:
|
def serialize_repr_traceback(reprtraceback: ReprTraceback) -> Dict[str, Any]:
|
||||||
result = attr.asdict(reprtraceback)
|
result = attr.asdict(reprtraceback) # type:ignore[arg-type]
|
||||||
result["reprentries"] = [
|
result["reprentries"] = [
|
||||||
serialize_repr_entry(x) for x in reprtraceback.reprentries
|
serialize_repr_entry(x) for x in reprtraceback.reprentries
|
||||||
]
|
]
|
||||||
|
@ -473,7 +473,7 @@ def _report_to_json(report: BaseReport) -> Dict[str, Any]:
|
||||||
reprcrash: Optional[ReprFileLocation],
|
reprcrash: Optional[ReprFileLocation],
|
||||||
) -> Optional[Dict[str, Any]]:
|
) -> Optional[Dict[str, Any]]:
|
||||||
if reprcrash is not None:
|
if reprcrash is not None:
|
||||||
return attr.asdict(reprcrash)
|
return attr.asdict(reprcrash) # type:ignore[arg-type]
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue