Skip to content

[pre-commit.ci] pre-commit autoupdate - #217

Merged
lgarrison merged 5 commits into
mainfrom
pre-commit-ci-update-config
Aug 6, 2026
Merged

[pre-commit.ci] pre-commit autoupdate#217
lgarrison merged 5 commits into
mainfrom
pre-commit-ci-update-config

Conversation

@pre-commit-ci

@pre-commit-ci pre-commit-ci Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

pre-commit-ci Bot and others added 5 commits August 3, 2026 18:26
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)
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>
@lgarrison
lgarrison merged commit 5de4b4e into main Aug 6, 2026
2 checks passed
@lgarrison
lgarrison deleted the pre-commit-ci-update-config branch August 6, 2026 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant