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