fixed bug in context manager definition

This commit is contained in:
brian
2025-01-06 11:26:23 +00:00
parent 226fb1a206
commit 3b677e5e97
+4 -1
View File
@@ -1,5 +1,7 @@
"""Definition of datastore interface.""" """Definition of datastore interface."""
from __future__ import annotations
from abc import ABC, abstractmethod from abc import ABC, abstractmethod
from collections import OrderedDict from collections import OrderedDict
@@ -25,8 +27,9 @@ class DatastoreInterface(ABC):
@abstractmethod @abstractmethod
def __enter__( def __enter__(
self, self,
) -> None: ) -> DatastoreInterface:
self.connect() self.connect()
return self
@abstractmethod @abstractmethod
def __exit__( def __exit__(