🔧 Update linting rules and pre-commit config (py310 floor, drop setup-cfg-fmt, bump revs)#564
Merged
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Mechanical changes from the bumped hooks, mainly pyupgrade --py310-plus (PEP 585/604 annotations), removal of now-unused typing imports, and black 26 / isort 8 reformatting. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
22339d0 to
19e1e97
Compare
The previous local pre-commit runs spuriously skipped tests/middleware_tests/test_latex_encoding.py, which made the pre-commit CI job fail on the sweep commit. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
# Conflicts: # bibtexparser/entrypoint.py # bibtexparser/library.py # bibtexparser/middlewares/latex_encoding.py # bibtexparser/middlewares/names.py
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.
Summary
Fixes the pre-commit config drift:
pyupgrade:--py36-plus→--py310-plus, matchingrequires-python = >=3.10(⬆️ Require Python 3.10+, test through 3.14 #557).setup-cfg-fmthook (nosetup.cfgsince the pyproject migration, 📦 Migrate packaging from setup.py to pyproject.toml #524).pre-commit autoupdaterev bumps: pre-commit-hooks v4.5.0→v6.0.0, black 24.2.0→26.5.1, autoflake v2.3.0→v2.3.3, isort 5.13.2→8.0.1 (autoupdate picked the9.0.0a3pre-release; pinned to latest stable instead), pyupgrade v3.15.1→v3.21.2, flake8 7.0.0→7.3.0.Includes the hook sweep after all
This was originally intended config-only, deferring the
--all-filesrewrite to a later PR to avoid conflicts with #560/#562/#563. That plan turned out not to be viable: the pre-commit CI job runs the updated hooks on all files, so the config-only head was red (see checks on 81e580d). The second commit therefore applies the hooks to the codebase: PEP 585/604 typing modernization, removal of then-unusedtypingimports, black 26 / isort 8 reformatting. Hooks were run to a fixpoint (they need several passes, as pyupgrade runs after autoflake/isort); the full test suite passes.Merge-order note: the sweep touches 25 files mechanically and will conflict with #560/#562/#563. Suggested order: merge those first, then rebase this branch and re-run
pre-commit run --all-filesto refresh the sweep. The annotation changes here may also partly subsume #563 / the538-type-annotationswork.The optional ruff consolidation from the issue is left out as a separate decision.
Fixes #546
🤖 Generated with Claude Code