Skip to content

Commit fc19e85

Browse files
noahnuNoah Negin-Ulster
authored andcommitted
fix: lru_cache on snapshot reads (#629)
1 parent 18c67eb commit fc19e85

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/syrupy/extensions/amber/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,10 @@ def _file_extension(self) -> str:
4747
def _read_snapshot_fossil(self, snapshot_location: str) -> "SnapshotFossil":
4848
return DataSerializer.read_file(snapshot_location)
4949

50+
@staticmethod
5051
@lru_cache()
5152
def __cacheable_read_snapshot(
52-
self, snapshot_location: str, cache_key: str
53+
snapshot_location: str, cache_key: str
5354
) -> "SnapshotFossil":
5455
return DataSerializer.read_file(snapshot_location)
5556

0 commit comments

Comments
 (0)