diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f4d008d5..f83bd5ea 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.7.4 + rev: v0.9.3 hooks: # Run the linter. - id: ruff diff --git a/janus_core/calculations/phonons.py b/janus_core/calculations/phonons.py index af2b9ee1..7919a2bd 100644 --- a/janus_core/calculations/phonons.py +++ b/janus_core/calculations/phonons.py @@ -598,9 +598,9 @@ def write_bands( labels = paths_info["labels"] num_q_points = sum(len(q) for q in paths_info["paths"]) num_labels = len(labels) - assert ( - num_q_points == num_labels - ), "Number of labels is different to number of q-points specified" + assert num_q_points == num_labels, ( + "Number of labels is different to number of q-points specified" + ) q_points, connections = get_band_qpoints_and_path_connections( band_paths=paths_info["paths"], npoints=paths_info["npoints"] diff --git a/janus_core/helpers/mlip_calculators.py b/janus_core/helpers/mlip_calculators.py index 25ecabe9..5706000b 100644 --- a/janus_core/helpers/mlip_calculators.py +++ b/janus_core/helpers/mlip_calculators.py @@ -113,8 +113,7 @@ def choose_calculator( # No default `model_path` if model_path is None: raise ValueError( - "Please specify `model_path`, as there is no " - f"default model for {arch}" + f"Please specify `model_path`, as there is no default model for {arch}" ) # Default to float64 precision kwargs.setdefault("default_dtype", "float64") diff --git a/janus_core/processing/observables.py b/janus_core/processing/observables.py index 93ed5c66..cd43371f 100644 --- a/janus_core/processing/observables.py +++ b/janus_core/processing/observables.py @@ -124,7 +124,7 @@ def components(self, components: list[str]): """ if any(components - self._allowed_components.keys()): raise ValueError( - f"'{components-self._allowed_components.keys()}'" + f"'{components - self._allowed_components.keys()}'" f" invalid, must be '{', '.join(self._allowed_components)}'" ) diff --git a/pyproject.toml b/pyproject.toml index 76f14b1e..783c8e10 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -91,7 +91,7 @@ docs = [ pre-commit = [ "pre-commit<4.0.0,>=3.6.0", - "ruff<1.0.0,>=0.7.4", + "ruff<1.0.0,>=0.9.3", ] [build-system]