From 9e60a426fd8bea5609c68fd30eadbae9b4d5a1f6 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 19 Dec 2024 07:24:44 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- diracx-core/src/diracx/core/config/__init__.py | 8 ++++++-- diracx-db/src/diracx/db/sql/job/db.py | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/diracx-core/src/diracx/core/config/__init__.py b/diracx-core/src/diracx/core/config/__init__.py index 46450045..0283767c 100644 --- a/diracx-core/src/diracx/core/config/__init__.py +++ b/diracx-core/src/diracx/core/config/__init__.py @@ -159,7 +159,9 @@ def latest_revision(self) -> tuple[str, datetime]: ).strip() modified = datetime.fromtimestamp(int(commit_info), tz=timezone.utc) except sh.ErrorReturnCode as e: - raise BadConfigurationVersionError(f"Error parsing latest revision: {e}") from e + raise BadConfigurationVersionError( + f"Error parsing latest revision: {e}" + ) from e logger.debug("Latest revision for %s is %s with mtime %s", self, rev, modified) return rev, modified @@ -176,7 +178,9 @@ def read_raw(self, hexsha: str, modified: datetime) -> Config: ) raw_obj = yaml.safe_load(blob) except sh.ErrorReturnCode as e: - raise BadConfigurationVersionError(f"Error reading configuration: {e}") from e + raise BadConfigurationVersionError( + f"Error reading configuration: {e}" + ) from e config_class: Config = select_from_extension(group="diracx", name="config")[ 0 diff --git a/diracx-db/src/diracx/db/sql/job/db.py b/diracx-db/src/diracx/db/sql/job/db.py index 44cda850..aee8853a 100644 --- a/diracx-db/src/diracx/db/sql/job/db.py +++ b/diracx-db/src/diracx/db/sql/job/db.py @@ -228,7 +228,9 @@ async def set_job_attributes_bulk(self, job_data): [{"b_JobID": job_id, **attrs} for job_id, attrs in job_data.items()], ) - async def get_job_jdls(self, job_ids, original: bool = False) -> dict[int | str, str]: + async def get_job_jdls( + self, job_ids, original: bool = False + ) -> dict[int | str, str]: from DIRAC.WorkloadManagementSystem.DB.JobDBUtils import extractJDL if original: