diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6557e47..0ea59d3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: check-toml - id: check-yaml @@ -19,21 +19,21 @@ repos: - id: requirements-txt-fixer - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 + rev: v2.4.2 hooks: - id: codespell additional_dependencies: - tomli - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.7.2 + rev: v0.15.9 hooks: - id: ruff args: ["--fix", "--show-fixes"] - id: ruff-format - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.22 + rev: v0.25 hooks: - id: validate-pyproject diff --git a/aok/core/kd_utils/Kd_analysis.py b/aok/core/kd_utils/Kd_analysis.py index 7d1504b..136d8fb 100644 --- a/aok/core/kd_utils/Kd_analysis.py +++ b/aok/core/kd_utils/Kd_analysis.py @@ -612,9 +612,7 @@ def _fit_kd_with_method( ) return kd, e0, nf - raise ValueError( - f"Unknown kd_fit_method: {method!r}. " f"Choose from {KD_FIT_METHODS}" - ) + raise ValueError(f"Unknown kd_fit_method: {method!r}. Choose from {KD_FIT_METHODS}") # another solution is to calculate kd without hist @@ -849,7 +847,7 @@ def calculate_kd( else: expected_nf_per_bin = None logging.info( - "Hybrid: insufficient noise floor estimates (%d), " "skipping pass 2", + "Hybrid: insufficient noise floor estimates (%d), skipping pass 2", len(valid_nf_all), ) diff --git a/aok/core/main.py b/aok/core/main.py index 9168ef0..864c21b 100644 --- a/aok/core/main.py +++ b/aok/core/main.py @@ -284,9 +284,9 @@ def run_pipeline(args): ["relative_AT_dist", "lat_bins", "photon_height"] ].drop_duplicates() unique_photon_dataset["relative_AT_dist_center"] = ( - unique_photon_dataset.groupby( - "lat_bins", observed=False - )["relative_AT_dist"].transform("mean") + unique_photon_dataset.groupby("lat_bins", observed=False)[ + "relative_AT_dist" + ].transform("mean") ) _closest_rows = []