From cdb50a8b7bf512acaf1d9f8ebfadfae41ace1660 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 5 Jan 2026 21:20:31 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v3.17.0 → v3.21.2](https://github.com/asottile/pyupgrade/compare/v3.17.0...v3.21.2) - [github.com/astral-sh/ruff-pre-commit: v0.6.2 → v0.14.10](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.2...v0.14.10) - [github.com/macisamuele/language-formatters-pre-commit-hooks: v2.14.0 → v2.15.0](https://github.com/macisamuele/language-formatters-pre-commit-hooks/compare/v2.14.0...v2.15.0) - [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.6.0...v6.0.0) --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 46b74e2..5aab992 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,12 +4,12 @@ ci: repos: # Bring Python code up to date with pyupgrade - repo: https://github.com/asottile/pyupgrade - rev: v3.17.0 + rev: v3.21.2 hooks: - id: pyupgrade - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.2 + rev: v0.14.10 hooks: - id: ruff args: [--fix, --show-fixes, --exit-non-zero-on-fix] @@ -17,7 +17,7 @@ repos: # Format YAML & TOML files prettily - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks - rev: v2.14.0 + rev: v2.15.0 hooks: - id: pretty-format-yaml args: [--autofix, --indent, '2'] @@ -26,7 +26,7 @@ repos: # Syntax check with pre-commit out-of-the-box hooks - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v6.0.0 hooks: - id: check-ast - id: check-json From f4df915170c25aa5bd0bffe2f3801821f24f9e61 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 5 Jan 2026 21:20:43 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/tristan/diagnostics/check_files.py | 2 +- src/tristan/diagnostics/check_valid_events.py | 2 +- src/tristan/diagnostics/find_trigger_intervals.py | 2 +- tests/test_command_line.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tristan/diagnostics/check_files.py b/src/tristan/diagnostics/check_files.py index 7ea1a0e..6049fd8 100644 --- a/src/tristan/diagnostics/check_files.py +++ b/src/tristan/diagnostics/check_files.py @@ -65,7 +65,7 @@ def setup_logging(wdir, filestem): def main(args): filepath = Path(args.visitpath).expanduser().resolve() - base = args.filename + f"_{6*'[0-9]'}.h5" + base = args.filename + f"_{6 * '[0-9]'}.h5" if args.output: savedir = Path(args.output).expanduser().resolve() diff --git a/src/tristan/diagnostics/check_valid_events.py b/src/tristan/diagnostics/check_valid_events.py index d21dfec..738ebf5 100644 --- a/src/tristan/diagnostics/check_valid_events.py +++ b/src/tristan/diagnostics/check_valid_events.py @@ -112,7 +112,7 @@ def event_timestamp_check(tristanlist): def main(args): filepath = Path(args.visitpath).expanduser().resolve() - base = args.filename + f"_{6*'[0-9]'}.h5" + base = args.filename + f"_{6 * '[0-9]'}.h5" filename_template = filepath / base file_list = get_full_file_list(filename_template) diff --git a/src/tristan/diagnostics/find_trigger_intervals.py b/src/tristan/diagnostics/find_trigger_intervals.py index 3e48d98..3d25d11 100644 --- a/src/tristan/diagnostics/find_trigger_intervals.py +++ b/src/tristan/diagnostics/find_trigger_intervals.py @@ -369,7 +369,7 @@ def log_only_requested_trigger_info(res: list[dict], trigger_request: list[str]) def main(args): filepath = Path(args.visitpath).expanduser().resolve() - base = args.filename + f"_{6*'[0-9]'}.h5" + base = args.filename + f"_{6 * '[0-9]'}.h5" # Current working directory if args.output: diff --git a/tests/test_command_line.py b/tests/test_command_line.py index d579738..347fa81 100644 --- a/tests/test_command_line.py +++ b/tests/test_command_line.py @@ -165,7 +165,7 @@ def test_input_file_action(): namespace = argparse.Namespace() directory = "some/dummy/path/to" stem = "file_name" - action(argparse.ArgumentParser(), namespace, f"{directory}" f"/{stem}_meta.h5") + action(argparse.ArgumentParser(), namespace, f"{directory}/{stem}_meta.h5") assert namespace.data_dir == Path(directory).resolve() assert namespace.stem == stem