Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #214

Merged
merged 2 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repos:
args: ["--fix"]

- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.1.1
hooks:
- id: black

Expand Down
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