diff --git a/src/syrupy/report.py b/src/syrupy/report.py index 7d07e14c..fa005423 100644 --- a/src/syrupy/report.py +++ b/src/syrupy/report.py @@ -89,9 +89,7 @@ def include_snapshot_details(self) -> bool: @cached_property def _collected_items_by_nodeid(self) -> Dict[str, "pytest.Item"]: - return { - getattr(item, "nodeid"): item for item in self.collected_items # noqa: B009 - } + return {item.nodeid: item for item in self.collected_items} def _has_xfail(self, item: "pytest.Item") -> bool: # xfailed_key is 'private'. I'm open to a better way to do this: