diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 832fd84..14e02c9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.4 + rev: v0.3.7 hooks: - id: ruff - id: ruff-format diff --git a/README.md b/README.md index ceedeac..2f61765 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ See [CITATION](https://github.com/Cosmoglobe/zodipy/blob/dev/CITATION.bib) if yo # For developers -Contributing developers will need to download the following additional dependencies to test, lint and build documentation locally: +Contributing developers will need to download the following additional dependencies to test, lint, format and build documentation locally: - pytest - pytest-cov - hypothesis @@ -96,11 +96,11 @@ from the repositry root. This will read and download all the dependencies from t Note that developers using Python 3.12 will need to upgrade their pip versions with `python3 -m pip install --upgrade pip` before being able to install ZodiPy. This is due to known incompatibilities between older pip versions and Python 3.12 -## Tests and formatting +## Tests, linting and formatting The following tools should be run from the root of the repository with no errors. (These are ran automatically as part of the CI workflows on GitHub, but should be tested locally first) - [pytest](https://docs.pytest.org/en/8.0.x/): Tests are run with pytest by simply running `pytest` in the command line in the root of the repository. -- [ruff](https://github.com/astral-sh/ruff): Formating and linting is done with `ruff` by simply running `ruff check zodipy/` in the command line in the root of the repository. +- [ruff](https://github.com/astral-sh/ruff): Formating and linting is done with `ruff` by simply running `ruff check zodipy/` and `ruff format zodipy/` in the command line in the root of the repository. - [mypy](https://mypy-lang.org/): Type checking is done with `mypy` by simply running `mypy zodipy/` in the root of the repository. Remeber to add tests when implementing new features to maintain a high code coverage. diff --git a/zodipy/_ipd_dens_funcs.py b/zodipy/_ipd_dens_funcs.py index 3e9ffc4..7109a99 100644 --- a/zodipy/_ipd_dens_funcs.py +++ b/zodipy/_ipd_dens_funcs.py @@ -411,8 +411,7 @@ def compute_feature_density_rmm( class ComponentDensityFn(Protocol): - def __call__(self, X_helio: npt.NDArray[np.float64]) -> npt.NDArray[np.float64]: - ... + def __call__(self, X_helio: npt.NDArray[np.float64]) -> npt.NDArray[np.float64]: ... def construct_density_partials(