[pre-commit.ci] pre-commit autoupdate - #217
Merged
Merged
Conversation
updates: - [github.com/astral-sh/ruff-pre-commit: v0.15.20 → v0.16.1](astral-sh/ruff-pre-commit@v0.15.20...v0.16.1)
for more information, see https://pre-commit.ci
Most are mechanical: dropping `.keys()`, `dict()` -> literal, collapsing nested ifs, percent-format -> f-strings, underscore-prefixing unused unpacked variables, and removing the version block that `requires-python = ">=3.10"` made dead. Three warrant explanation: - `arr[arr != arr] = 0` was the NaN idiom; `np.isnan` says it directly, so the accompanying comments are no longer needed. - `bin_kmu` is njit'd and calls `poles.astype()`, so its `poles` default can't become a tuple like the other sequence defaults; it reads from a module-level constant instead. - RUF046 is wrong about `int(round(ppd))`: `ppd` may be a numpy scalar, whose `__round__` returns a numpy float, so the cast is load-bearing. Converting to a Python float first drops the cast honestly. The `int(math.ceil(...))` site is a true positive and is unwrapped. N999 on GRAND_HOD.py is ignored via config rather than fixed: it is a documented import path, so renaming the module would break users. Exception types change in a user-visible way, hence the CHANGES.rst entry. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
For better match between local and ci invocations of linters.
Completes the 0.16 default-ruleset cleanup outside abacusnbody, so `pre-commit run --all-files` passes. Mostly mechanical (C408, C414, C405, SIM118, UP031). Three exceptions: - SampleFileUtil's two handles live on `self` and are closed by close(), a lifetime a `with` block can't express, so they get a SIM115 noqa rather than a restructure of working checkpoint code. - gather_metadata's blind except stays: Abacus.InputFile is external and its failure modes aren't specified, so narrowing the catch could silently start skipping sims. Logging the exception is what S112 wants anyway; only BLE001 needs the noqa. - zcv.ipynb's context-manager change spans lines within a cell, so it was edited by hand and re-serialized at the notebook's existing indent. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
updates: