diff --git a/ptvp35/__init__.py b/ptvp35/__init__.py index 52e7ea6..0f87f27 100644 --- a/ptvp35/__init__.py +++ b/ptvp35/__init__.py @@ -62,11 +62,13 @@ note: unstable signature.""" __slots__ = () + @abc.abstractmethod def line(self, key: Any, value: Any, /) -> str: """line must contain exactly one '\\n' at exactly the end if the line is not empty. note: other forms of requests will later be represented by different methods or by instances of Action class.""" raise NotImplementedError + @abc.abstractmethod def fromline(self, line: str, /) -> tuple[Any, Any]: """inverse of line(). note: unstable signature.""" @@ -238,19 +240,24 @@ class VirtualConnection(abc.ABC): __slots__ = () + @abc.abstractmethod def get(self, key: Any, default: Any, /): raise NotImplementedError + @abc.abstractmethod async def commit_transaction(self, delta: dict, /) -> None: raise NotImplementedError + @abc.abstractmethod def submit_transaction_request(self, delta: dict, future: asyncio.Future | None, /) -> None: raise NotImplementedError + @abc.abstractmethod @nightly def loop(self, /) -> asyncio.AbstractEventLoop: raise NotImplementedError + @abc.abstractmethod def transaction(self, /) -> 'Transaction': return Transaction(self)