Skip to content

Review and replace complex - #16743

Open
srittau wants to merge 6 commits into
python:mainfrom
srittau:complex-int
Open

srittau wants to merge 6 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
2 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

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

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

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants