FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Replace `builtins.ellipsis` with `types.EllipsisType` by hamdanal · Pull Request #21911 · python/mypy · GitHub

Repository navigation

Replace builtins.ellipsis with types.EllipsisType - #21911

Merged
JelleZijlstra merged 1 commit into
python:masterfrom
hamdanal:ellipsis
Aug 29, 2026
Merged

JelleZijlstra merged 1 commit into
python:masterfrom
hamdanal:ellipsis

Conversation

hamdanal commented Aug 29, 2026 •
edited
Loading

Copy link
Copy Markdown
Collaborator

Part of #8240

Unblocks python/typeshed#15712

The actual change is one line in checkexpr and the other changes are for tests, mostly mechanical.
I used the try except trick used for types.ModuleType in the name lookup so that tests that don't import the types module don't crash with KeyError when they use ... (which is used in almost all tests as empty function body).

Most test changes are caused by modules now correctly resolving to module type instead of object because some fixtures started importing types.

The changes are mine, I only used a coding agent to fix the fine-grained-modules.test and testexportjson.py tests and the missing visitor method.

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

Comment thread mypy/test/teststubtest.py
JelleZijlstra merged commit 6934a9d into python:master Aug 29, 2026
25 checks passed
hamdanal deleted the ellipsis branch August 29, 2026 16:47
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL