Move pickle functions to PickleRepo

This commit is contained in:
Marty Oehme 2025-06-06 12:32:31 +02:00
parent c216c2d0d7
commit 121e678c7d
Signed by: Marty
GPG key ID: 4E535BC19C61886E
3 changed files with 65 additions and 40 deletions

View file

@ -1,13 +1,19 @@
from typing import Protocol
from prophet.domain.improvement import Improvement
class ImprovementNotFoundError(Exception):
pass
class IImprovementRepo(Protocol):
def add(self, improvement: Improvement) -> None:
raise NotImplementedError
def add_all(self, improvements: list[Improvement]) -> None:
raise NotImplementedError
def get(self, id: str) -> Improvement:
raise NotImplementedError