ruff format corrections
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
"""python_repositories: Unified repository interfaces and adapters."""
|
"""python_repositories: Unified repository interfaces and adapters."""
|
||||||
|
|
||||||
from . import adapters
|
from . import adapters
|
||||||
from . import interfaces
|
from . import interfaces
|
||||||
|
|
||||||
__all__ = ['adapters', 'interfaces']
|
__all__ = ["adapters", "interfaces"]
|
||||||
|
|||||||
@@ -43,17 +43,10 @@ class RedisAdapter(
|
|||||||
return self
|
return self
|
||||||
|
|
||||||
def __exit__(
|
def __exit__(
|
||||||
self,
|
self, exc_type: type | None, exc_val: object | None, exc_tb: object | None
|
||||||
exc_type: type | None,
|
|
||||||
exc_val: object | None,
|
|
||||||
exc_tb: object | None
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Exit the context."""
|
"""Exit the context."""
|
||||||
ctx_info = {
|
ctx_info = {"exc_type": exc_type, "exc_val": exc_val, "exc_tb": exc_tb}
|
||||||
'exc_type': exc_type,
|
|
||||||
'exc_val': exc_val,
|
|
||||||
'exc_tb': exc_tb
|
|
||||||
}
|
|
||||||
if any(
|
if any(
|
||||||
(
|
(
|
||||||
exc_type is not None,
|
exc_type is not None,
|
||||||
@@ -148,9 +141,6 @@ class RedisAdapter(
|
|||||||
list[bytes],
|
list[bytes],
|
||||||
self._client.keys(pattern),
|
self._client.keys(pattern),
|
||||||
)
|
)
|
||||||
keys: list[str] = [
|
keys: list[str] = [key.decode(self.encoding) for key in keys_raw]
|
||||||
key.decode(self.encoding)
|
|
||||||
for key in keys_raw
|
|
||||||
]
|
|
||||||
self.logger.debug(f"Got {keys} matching {pattern}")
|
self.logger.debug(f"Got {keys} matching {pattern}")
|
||||||
return keys
|
return keys
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
from .connection_aware_interface import ConnectionAwareInterface as ConnectionAwareInterface
|
from .connection_aware_interface import (
|
||||||
|
ConnectionAwareInterface as ConnectionAwareInterface,
|
||||||
|
)
|
||||||
from .context_aware_interface import ContextAwareInterface as ContextAwareInterface
|
from .context_aware_interface import ContextAwareInterface as ContextAwareInterface
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
|
|||||||
@@ -15,10 +15,7 @@ class ContextAwareInterface(ABC):
|
|||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def __exit__(
|
def __exit__(
|
||||||
self,
|
self, exc_type: type | None, exc_val: object | None, exc_tb: object | None
|
||||||
exc_type: type | None,
|
|
||||||
exc_val: object | None,
|
|
||||||
exc_tb: object | None
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Exit the context."""
|
"""Exit the context."""
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|||||||
Reference in New Issue
Block a user