Skip to content

Fix lint CI: remove flake8-string-format (broken on Python 3.14) - #573

Merged
ap-- merged 1 commit into
fsspec:mainfrom
ap--:fix-lint-py314
Nov 9, 2026
Merged

ap-- merged 1 commit into
fsspec:mainfrom
ap--:fix-lint-py314

Conversation

@ap--

@ap-- ap-- commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

The lint job is currently failing on main and on open PRs (e.g. #572):

AttributeError: module 'ast' has no attribute 'Str'

Cause

  • ubuntu-latest now resolves to ubuntu-26.04 (previously ubuntu-24.04), whose system Python is 3.14.
  • The lint nox session doesn't pin a Python and pre-commit uses python3, so the flake8 hook now runs on 3.14.
  • flake8-string-format==0.3.0 (latest release, from 2020) uses ast.Str, which was removed in Python 3.14.

Fix

Drop flake8-string-format from the flake8 hook and remove its P select/P1 ignore from .flake8. Its P1xx checks were already ignored, and pyflakes' F521–F525 checks already cover str.format argument validation, so little coverage is lost.

Verification

Ran pre-commit run --all-files locally with Python 3.14 — all hooks pass.

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>
@ap--
ap-- merged commit 20170b1 into fsspec:main Nov 9, 2026
27 checks passed
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