Repository navigation
Fix lint CI: remove flake8-string-format (broken on Python 3.14) - #573
Merged
Merged
Conversation
ubuntu-latest now resolves to ubuntu-26.04, whose system Python is 3.14. flake8-string-format 0.3.0 (last released in 2020) uses `ast.Str`, which was removed in Python 3.14, crashing the flake8 pre-commit hook. Its P1xx checks were already ignored, and pyflakes' F52x checks cover the str.format argument validation it provided, so drop the plugin. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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.
The
lintjob is currently failing onmainand on open PRs (e.g. #572):Cause
ubuntu-latestnow resolves toubuntu-26.04(previouslyubuntu-24.04), whose system Python is 3.14.lintnox session doesn't pin a Python and pre-commit usespython3, so the flake8 hook now runs on 3.14.flake8-string-format==0.3.0(latest release, from 2020) usesast.Str, which was removed in Python 3.14.Fix
Drop
flake8-string-formatfrom the flake8 hook and remove itsPselect/P1ignore from.flake8. Its P1xx checks were already ignored, and pyflakes' F521–F525 checks already coverstr.formatargument validation, so little coverage is lost.Verification
Ran
pre-commit run --all-fileslocally with Python 3.14 — all hooks pass.