Move pickle functions to PickleRepo
This commit is contained in:
parent
c216c2d0d7
commit
121e678c7d
3 changed files with 65 additions and 40 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue