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 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