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

"def" in error messages about FunctionType/Callable etc is confusing #829

Open
DetachHead opened this issue Nov 29, 2024 · 0 comments
Open

Comments

@DetachHead
Copy link
Collaborator

bar: Callable[[], None]
foo: FunctionType[[], None] = bar
Incompatible types in assignment (expression has type "() -> None", variable has type "def () -> None")

the situation with these types is already confusing enough, and this error message just adds to the confusion. it should just show the type names as they are defined:

Incompatible types in assignment (expression has type "Callable[[], None]", variable has type "FunctionType[[], None]")

or if you wanna keep the based syntax:

Incompatible types in assignment (expression has type "Callable[() -> None]", variable has type "FunctionType[() -> None]")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants