Skip to content

Review and replace complex - #16743

Merged
srittau merged 7 commits into
python:mainfrom
srittau:complex-int
Nov 12, 2026
Merged

srittau merged 7 commits into
python:mainfrom
srittau:complex-int

Conversation

@srittau

@srittau srittau commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator
  • Replace with complex | float | int where all types are accepted.
  • Keep where only complex is accepted or returned.
  • Keep where complex is already used in an union with float and int.

Part of #16059

- Replace most instances of `_typeshed.ComplexInt` (as a marker that the
  exact type needs to be checked).
- Replace a few instances with `complex | float | int` where all types
  are accepted.
- Left a few instances that were either already an union with `float`
  and/or `int` or only accept `complex`.

Part of python#16059
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@srittau srittau mentioned this pull request Nov 9, 2026
3 of 7 tasks
@srittau srittau changed the title Replace complex Review and replace complex Nov 9, 2026
Comment thread stdlib/builtins.pyi Resolved
@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau
srittau merged commit 3721ff1 into python:main Nov 12, 2026
91 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.

4 participants