Skip to content

Commit

Permalink
Apply ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
ElliottKasoar committed Jan 28, 2025
1 parent f3b4a15 commit 27afecf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions janus_core/calculations/phonons.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
3 changes: 1 addition & 2 deletions janus_core/helpers/mlip_calculators.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion janus_core/processing/observables.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)}'"
)

Expand Down

0 comments on commit 27afecf

Please sign in to comment.