diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 99b26719..ab8e4761 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,7 +17,7 @@ repos: - id: rst-inline-touching-normal - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 + rev: v2.4.1 hooks: - id: codespell additional_dependencies: @@ -25,7 +25,7 @@ repos: exclude: (\.(svg|png|pdf)$)|(CODE_OF_CONDUCT.md) - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.0 + rev: v0.9.5 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix, --show-fixes] diff --git a/src/data_morph/bounds/bounding_box.py b/src/data_morph/bounds/bounding_box.py index bbb30d18..e5d46b8b 100644 --- a/src/data_morph/bounds/bounding_box.py +++ b/src/data_morph/bounds/bounding_box.py @@ -95,7 +95,7 @@ def __eq__(self, other: BoundingBox) -> bool: return self.x_bounds == other.x_bounds and self.y_bounds == other.y_bounds def __repr__(self) -> str: - return '\n' f' x={self.x_bounds}' '\n' f' y={self.y_bounds}' + return f'\n x={self.x_bounds}\n y={self.y_bounds}' def adjust_bounds(self, x: Number | None = None, y: Number | None = None) -> None: """ diff --git a/src/data_morph/data/dataset.py b/src/data_morph/data/dataset.py index aa26c834..3adfea4c 100644 --- a/src/data_morph/data/dataset.py +++ b/src/data_morph/data/dataset.py @@ -175,7 +175,7 @@ def _validate_data(self, data: pd.DataFrame) -> pd.DataFrame: raise ValueError( 'Columns "x" and "y" are required for datasets. The provided ' 'dataset is missing the following column(s): ' - f"{', '.join(sorted(missing_columns))}." + f'{", ".join(sorted(missing_columns))}.' ) data = data.rename(columns={col.upper(): col for col in missing_columns}) diff --git a/tests/test_morpher.py b/tests/test_morpher.py index b740d386..28aacc23 100644 --- a/tests/test_morpher.py +++ b/tests/test_morpher.py @@ -225,7 +225,7 @@ def test_saving_data(self, tmp_path): with pytest.raises(AssertionError): assert_frame_equal( pd.read_csv( - tmp_path / f'{base_file_name}-data-{num_frames//2:03d}.csv' + tmp_path / f'{base_file_name}-data-{num_frames // 2:03d}.csv' ), morphed_data, )