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 Dec 19, 2024
1 parent a772574 commit 9e60a42
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 6 additions & 2 deletions diracx-core/src/diracx/core/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
4 changes: 3 additions & 1 deletion diracx-db/src/diracx/db/sql/job/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 9e60a42

Please sign in to comment.