ruff format corrections
Code Quality Pipeline / code-quality (pull_request) Successful in 16s
Test Python Package / test (pull_request) Failing after 9s

This commit is contained in:
Brian Bjarke Jensen
2025-09-14 16:17:04 +02:00
parent 59a943e39a
commit 5d7afe7a6c
4 changed files with 9 additions and 19 deletions
+2 -1
View File
@@ -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"]
+3 -13
View File
@@ -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
+3 -1
View File
@@ -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()