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

gh-130821: Add type information to wrong type error messages #130835

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

donBarbos
Copy link
Contributor

@donBarbos donBarbos commented Mar 4, 2025

I got next output for use case from issue:

Foo.__int__ returned non-int (type NoneType)
Foo.__float__ returned non-float (type NoneType)
Foo.__bytes__ returned non-bytes (type NoneType)
Foo.__complex__ returned non-complex (type NoneType)
Foo.__bool__ returned non-bool (type NoneType)
Foo.__str__ returned non-string (type NoneType)

but we still have a lot of other places where wrong type errors have inconsistent messages. should they be updated too?

Copy link
Contributor

@jstasiak jstasiak left a comment

Choose a reason for hiding this comment

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

Drive-by comment: does it make sense to have tests for these changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants