Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 29, 2024
1 parent 2943356 commit 128a2f1
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 16 deletions.
6 changes: 3 additions & 3 deletions diracx-cli/src/diracx/cli/internal/legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,9 @@ def generate_helm_values(
# Sandboxstore settings
# TODO: Integrate minio for production use (ingress, etc)
# By default, take the server hostname and prepend "sandboxes"
diracx_settings[
"DIRACX_SANDBOX_STORE_BUCKET_NAME"
] = f"{diracx_hostname.split('.')[0]}-sandboxes"
diracx_settings["DIRACX_SANDBOX_STORE_BUCKET_NAME"] = (
f"{diracx_hostname.split('.')[0]}-sandboxes"
)
diracx_settings["DIRACX_SANDBOX_STORE_S3_CLIENT_KWARGS"] = json.dumps(
{
"endpoint_url": "FILL ME",
Expand Down
8 changes: 5 additions & 3 deletions diracx-client/src/diracx/client/_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,9 +799,11 @@ def query(self, name, data, data_type, **kwargs):
if data_type.startswith("["):
internal_data_type = data_type[1:-1]
data = [
self.serialize_data(d, internal_data_type, **kwargs)
if d is not None
else ""
(
self.serialize_data(d, internal_data_type, **kwargs)
if d is not None
else ""
)
for d in data
]
if not kwargs.get("skip_quote", False):
Expand Down
9 changes: 3 additions & 6 deletions diracx-core/src/diracx/core/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,13 @@ class ConfigSource(metaclass=ABCMeta):
scheme: str

@abstractmethod
def __init__(self, *, backend_url: ConfigSourceUrl) -> None:
...
def __init__(self, *, backend_url: ConfigSourceUrl) -> None: ...

@abstractmethod
def latest_revision(self) -> tuple[str, datetime]:
...
def latest_revision(self) -> tuple[str, datetime]: ...

@abstractmethod
def read_raw(self, hexsha: str, modified: datetime) -> Config:
...
def read_raw(self, hexsha: str, modified: datetime) -> Config: ...

def __init_subclass__(cls) -> None:
if cls.scheme in cls.__registry:
Expand Down
3 changes: 1 addition & 2 deletions diracx-core/src/diracx/core/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ def __init__(self, detail: str = "Unknown"):
self.detail = detail


class AuthorizationError(DiracError):
...
class AuthorizationError(DiracError): ...


class PendingAuthorizationError(AuthorizationError):
Expand Down
1 change: 1 addition & 0 deletions diracx-core/src/diracx/core/properties.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
""" Just listing the possible Properties
This module contains list of Properties that can be assigned to users and groups
"""

from __future__ import annotations

import inspect
Expand Down
1 change: 1 addition & 0 deletions diracx-core/src/diracx/core/s3.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utilities for interacting with S3-compatible storage."""

from __future__ import annotations

__all__ = (
Expand Down
3 changes: 1 addition & 2 deletions diracx-db/src/diracx/db/os/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ class BaseOSDB(metaclass=ABCMeta):
index_prefix: str

@abstractmethod
def index_name(self, doc_id: int) -> str:
...
def index_name(self, doc_id: int) -> str: ...

def __init__(self, connection_kwargs: dict[str, Any]) -> None:
self._client: AsyncOpenSearch | None = None
Expand Down

0 comments on commit 128a2f1

Please sign in to comment.