Skip to content

Run the MyPy pre-commit hook on Python 3.10 - #1546

Open
rodrigobnogueira wants to merge 1 commit into
abhinavsingh:developfrom
rodrigobnogueira:maintenance/mypy-hook-python310
Open

rodrigobnogueira wants to merge 1 commit into
abhinavsingh:developfrom
rodrigobnogueira:maintenance/mypy-hook-python310

Conversation

@rodrigobnogueira

Copy link
Copy Markdown

pre-commit.ci fails on the MyPy hook with "The typed_ast package is not installed." It builds hook environments with Python 3.14, and MyPy 0.910, pinned through mirrors-mypy v0.910, imports ast.Str, ast.Num and other names that 3.14 removed; that failed import is what surfaces as the typed_ast message. On #1543 the failure was hidden: pre-commit.ci cut its output off inside Flake8's RST399 report, before the MyPy result.

This runs the hook on Python 3.10, like the Flake8 hook already does, with a note saying when the pin can be dropped. The GitHub Actions lint job already runs pre-commit on Python 3.10, so its results do not change.

Until #1545 is merged, Flake8 still fails here, both on pre-commit.ci and in the lint job, and pre-commit.ci may cut its output off before the MyPy result again.

Part of #1544.

MyPy 0.910 imports ast.Str, ast.Num and other names that Python 3.14
removed, and the failed import surfaces as "The typed_ast package is
not installed". pre-commit.ci builds hook environments with Python
3.14, so the hook failed there. Run it on 3.10, as the Flake8 hook
already does.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided Used by chronographer to mark a PR as CHANGELOG provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant