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 20, 2024
1 parent 7f6f884 commit 7a8ab97
Showing 1 changed file with 6 additions and 2 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(

Check warning on line 162 in diracx-core/src/diracx/core/config/__init__.py

View check run for this annotation

Codecov / codecov/patch

diracx-core/src/diracx/core/config/__init__.py#L162

Added line #L162 was not covered by tests
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(

Check warning on line 181 in diracx-core/src/diracx/core/config/__init__.py

View check run for this annotation

Codecov / codecov/patch

diracx-core/src/diracx/core/config/__init__.py#L181

Added line #L181 was not covered by tests
f"Error reading configuration: {e}"
) from e

config_class: Config = select_from_extension(group="diracx", name="config")[
0
Expand Down

0 comments on commit 7a8ab97

Please sign in to comment.