Skip to content

Commit be847e0

Browse files
authored
Merge pull request #652 from simvue-io/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2 parents e0f5bde + 1f53052 commit be847e0

File tree

5 files changed

+12
-18
lines changed

5 files changed

+12
-18
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ repos:
2323
args: [--branch, main, --branch, dev]
2424
- id: check-added-large-files
2525
- repo: https://github.com/astral-sh/ruff-pre-commit
26-
rev: v0.8.6
26+
rev: v0.9.1
2727
hooks:
2828
- id: ruff
2929
args: [ --fix, --exit-non-zero-on-fix, "--ignore=C901" ]
@@ -35,7 +35,7 @@ repos:
3535
pass_filenames: false
3636

3737
- repo: https://github.com/PyCQA/bandit.git
38-
rev: 1.8.0
38+
rev: 1.8.2
3939
hooks:
4040
- id: bandit
4141
args: [-lll, --recursive, clumper]

simvue/client.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -543,8 +543,7 @@ def delete_folder(
543543
return None
544544
else:
545545
raise RuntimeError(
546-
f"Deletion of folder '{folder_path}' failed, "
547-
"folder does not exist."
546+
f"Deletion of folder '{folder_path}' failed, folder does not exist."
548547
)
549548

550549
params: dict[str, bool] = {"runs": True} if remove_runs else {}
@@ -906,8 +905,7 @@ def get_artifacts_as_files(
906905
future.result()
907906
except Exception as e:
908907
raise RuntimeError(
909-
f"Download of file {download['url']} "
910-
f"failed with exception: {e}"
908+
f"Download of file {download['url']} failed with exception: {e}"
911909
)
912910

913911
@prettify_pydantic
@@ -1063,7 +1061,7 @@ def _get_run_metrics_from_server(
10631061

10641062
json_response = self._get_json_from_response(
10651063
expected_status=[http.HTTPStatus.OK],
1066-
scenario=f"Retrieval of metrics '{metric_names}' in " f"runs '{run_ids}'",
1064+
scenario=f"Retrieval of metrics '{metric_names}' in runs '{run_ids}'",
10671065
response=metrics_response,
10681066
)
10691067

@@ -1235,8 +1233,7 @@ def plot_metrics(
12351233

12361234
if data is None:
12371235
raise RuntimeError(
1238-
f"Cannot plot metrics {metric_names}, "
1239-
f"no data found for runs {run_ids}."
1236+
f"Cannot plot metrics {metric_names}, no data found for runs {run_ids}."
12401237
)
12411238

12421239
# Undo multi-indexing

simvue/config/files.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
CONFIG_FILE_NAMES: list[str] = ["simvue.toml", ".simvue.toml"]
1212

1313
CONFIG_INI_FILE_NAMES: list[str] = [
14-
f'{pathlib.Path.cwd().joinpath("simvue.ini")}',
15-
f'{pathlib.Path.home().joinpath(".simvue.ini")}',
14+
f"{pathlib.Path.cwd().joinpath('simvue.ini')}",
15+
f"{pathlib.Path.home().joinpath('.simvue.ini')}",
1616
]
1717

1818
DEFAULT_OFFLINE_DIRECTORY: str = f"{pathlib.Path.home().joinpath('.simvue')}"

simvue/run.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ def _wrapper(self: Self, *args: typing.Any, **kwargs: typing.Any) -> typing.Any:
8383

8484
if not self._simvue:
8585
raise RuntimeError(
86-
"Simvue Run must be initialised before calling "
87-
f"'{function.__name__}'"
86+
f"Simvue Run must be initialised before calling '{function.__name__}'"
8887
)
8988
return function(self, *args, **kwargs)
9089

@@ -852,13 +851,13 @@ def callback_function(status_code: int, std_out: str, std_err: str) -> None:
852851
if isinstance(val, bool) and val:
853852
cmd_list += [f"-{kwarg}"]
854853
else:
855-
cmd_list += [f"-{kwarg}{(' '+ _quoted_val) if val else ''}"]
854+
cmd_list += [f"-{kwarg}{(' ' + _quoted_val) if val else ''}"]
856855
else:
857856
kwarg = kwarg.replace("_", "-")
858857
if isinstance(val, bool) and val:
859858
cmd_list += [f"--{kwarg}"]
860859
else:
861-
cmd_list += [f"--{kwarg}{(' '+_quoted_val) if val else ''}"]
860+
cmd_list += [f"--{kwarg}{(' ' + _quoted_val) if val else ''}"]
862861

863862
cmd_list += pos_args
864863
cmd_str = " ".join(cmd_list)

simvue/system.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,7 @@ def get_system() -> dict[str, typing.Any]:
7171
system["cwd"] = os.getcwd()
7272
system["hostname"] = socket.gethostname()
7373
system["pythonversion"] = (
74-
f"{sys.version_info.major}."
75-
f"{sys.version_info.minor}."
76-
f"{sys.version_info.micro}"
74+
f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}"
7775
)
7876
system["platform"] = {}
7977
system["platform"]["system"] = platform.system()

0 commit comments

Comments
 (0)