Feat(inventoryStore): add 'invalidate_cache' to the Flake protocol

This commit is contained in:
Johannes Kirschbauer
2025-05-27 17:56:35 +02:00
parent e6d1f71907
commit f591ac0c32
2 changed files with 7 additions and 0 deletions

View File

@@ -86,6 +86,8 @@ class FlakeInterface(Protocol):
nix_options: list[str] | None = None,
) -> Any: ...
def invalidate_cache(self) -> None: ...
@property
def path(self) -> Path: ...
@@ -251,3 +253,5 @@ class InventoryStore:
self._flake.path,
commit_message=f"update({self.inventory_file.name}): {message}",
)
self._flake.invalidate_cache()

View File

@@ -20,6 +20,9 @@ class MockFlake:
assert f.exists(), f"File {f} does not exist"
self._file = f
def invalidate_cache(self) -> None:
pass
def select(
self,
selector: str,