Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add explanation if argument type is incompatible because of a "numbers" type #15137

Merged
merged 5 commits into from
Apr 26, 2023

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Apr 25, 2023

Types from numbers aren't really supported in any useful way. Make it more explicit, since this is surprising.

Work on #3186.

@JukkaL JukkaL changed the title Add explanation if argument type is incompatible because of type from "numbers" Add explanation if argument type is incompatible because a "numbers" type Apr 25, 2023
@JukkaL JukkaL changed the title Add explanation if argument type is incompatible because a "numbers" type Add explanation if argument type is incompatible because of a "numbers" type Apr 25, 2023
Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

Brilliant that we're improving usability here!

mypy/messages.py Outdated Show resolved Hide resolved
mypy/messages.py Show resolved Hide resolved
@github-actions

This comment has been minimized.

JukkaL and others added 3 commits April 25, 2023 17:19
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

yay!

@github-actions
Copy link
Contributor

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

spack (https://github.com/spack/spack) got 1.10 slower (67.7s -> 74.6s)

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

This looks great, thank you!

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