Skip to content

Require mypy>=1.20 and fix reveal_type assertions#949

Merged
Carreau merged 2 commits into
ipython:mainfrom
Carreau:f4
Jul 16, 2026
Merged

Require mypy>=1.20 and fix reveal_type assertions#949
Carreau merged 2 commits into
ipython:mainfrom
Carreau:f4

Conversation

@Carreau

@Carreau Carreau commented Jul 16, 2026

Copy link
Copy Markdown
Member

mypy 1.20 simplified reveal_type() output by dropping the builtins. prefix (python/mypy#20929). Update the assertions in tests/test_typing.py to the new representation and raise the pin accordingly.

Also skip following imports into numpy stubs, which are pulled in transitively via import pytest and use the type statement that mypy rejects under python_version = "3.10".

Carreau and others added 2 commits July 16, 2026 14:57
mypy 1.20 simplified `reveal_type()` output by dropping the `builtins.`
prefix (python/mypy#20929). Update the assertions in tests/test_typing.py
to the new representation and raise the pin accordingly.

Also skip following imports into numpy stubs, which are pulled in
transitively via `import pytest` and use the `type` statement that mypy
rejects under python_version = "3.10".
mypy does not support PyPy (python/mypy#20329), so gate `mypy` and
`pytest-mypy-testing` behind an `implementation_name != 'pypy'` marker and
ignore `tests/test_typing.py` there during collection.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Carreau
Carreau merged commit e6109d6 into ipython:main Jul 16, 2026
37 of 39 checks passed
@Carreau
Carreau deleted the f4 branch July 16, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants