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

Avoid unnecessary sum type expansion when narrowing by hauntsaninja · Pull Request #22252 · python/mypy · GitHub

Repository navigation

Avoid unnecessary sum type expansion when narrowing - #22252

Merged
hauntsaninja merged 1 commit into
python:masterfrom
hauntsaninja:simply
Oct 21, 2026
Merged

hauntsaninja merged 1 commit into
python:masterfrom
hauntsaninja:simply

Conversation

Copy link
Copy Markdown
Collaborator

conditional_types already expands bool and enum types when the target is a matching literal.

Authored by Codex

conditional_types already expands bool and enum types when the target is
a matching literal.

Authored by Codex

Copy link
Copy Markdown
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

sphinx (https://github.com/sphinx-doc/sphinx)
- sphinx/testing/util.py:80:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports

hauntsaninja merged commit 049dbf0 into python:master Oct 21, 2026
25 checks passed
hauntsaninja deleted the simply branch October 21, 2026 16:21
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.

1 participant


Back | FazBrowse Home | New Git URL