Add public repository interfaces and subclassable adapter CRUD API.
Define split JSON and object repository ABCs, promote adapter methods to public CRUD, add example domain repositories, modernize interface stubs, and make the package installable for tests. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
co-authored by
Cursor
parent
f4280f15c1
commit
e98fd3b90d
@@ -1,4 +1,4 @@
|
||||
"""Definition of ConnectionAwareInterface abstract base class."""
|
||||
"""Definition of ContextAwareInterface abstract base class."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -6,16 +6,16 @@ from abc import ABC, abstractmethod
|
||||
|
||||
|
||||
class ContextAwareInterface(ABC):
|
||||
"""Interface that defined context-related methods."""
|
||||
"""Interface that defines context-related methods."""
|
||||
|
||||
@abstractmethod
|
||||
def __enter__(self) -> ContextAwareInterface:
|
||||
"""Enter the context."""
|
||||
raise NotImplementedError()
|
||||
...
|
||||
|
||||
@abstractmethod
|
||||
def __exit__(
|
||||
self, exc_type: type | None, exc_val: object | None, exc_tb: object | None
|
||||
) -> None:
|
||||
"""Exit the context."""
|
||||
raise NotImplementedError()
|
||||
...
|
||||
|
||||
Reference in New Issue
Block a user