From aae93d6127c43a7f9036556ba7482019d389e21d Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Fri, 26 Aug 2022 09:57:18 -0300 Subject: [PATCH] Ignore type-errors related to attr.asdict --- src/_pytest/reports.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/_pytest/reports.py b/src/_pytest/reports.py index 725fdf61739..3c58321e706 100644 --- a/src/_pytest/reports.py +++ b/src/_pytest/reports.py @@ -455,7 +455,7 @@ def _report_to_json(report: BaseReport) -> Dict[str, Any]: def serialize_repr_entry( entry: Union[ReprEntry, ReprEntryNative] ) -> Dict[str, Any]: - data = attr.asdict(entry) + data = attr.asdict(entry) # type:ignore[arg-type] for key, value in data.items(): if hasattr(value, "__dict__"): data[key] = attr.asdict(value) @@ -463,7 +463,7 @@ def serialize_repr_entry( return entry_data def serialize_repr_traceback(reprtraceback: ReprTraceback) -> Dict[str, Any]: - result = attr.asdict(reprtraceback) + result = attr.asdict(reprtraceback) # type:ignore[arg-type] result["reprentries"] = [ serialize_repr_entry(x) for x in reprtraceback.reprentries ] @@ -473,7 +473,7 @@ def serialize_repr_crash( reprcrash: Optional[ReprFileLocation], ) -> Optional[Dict[str, Any]]: if reprcrash is not None: - return attr.asdict(reprcrash) + return attr.asdict(reprcrash) # type:ignore[arg-type] else: return None