Skip to content

Conversation

@GameRoMan
Copy link

Adds overlaods for __new__ method in int, str and bool classes, when no value is provided as an arguement

@github-actions
Copy link
Contributor

github-actions bot commented Jun 4, 2025

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

colour (https://github.com/colour-science/colour)
+ colour/notation/hexadecimal.py:135: note:     def __new__(cls) -> int

ibis (https://github.com/ibis-project/ibis)
+ ibis/common/temporal.py:203: note:     def __new__(cls) -> int

discord.py (https://github.com/Rapptz/discord.py)
+ discord/app_commands/models.py:223: note:     def __new__(cls) -> int

Copy link
Collaborator

@sterliakov sterliakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you think such a typeshed change is necessary, it does not belong to mypy - typeshed is maintained separately at https://github.com/python/typeshed, mypy only ships its (regularly synced) copy with a few modifications.

@JukkaL JukkaL closed this Jun 5, 2025
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.

3 participants