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

Improve error message for incompatible return type #735

Merged
merged 1 commit into from
Mar 2, 2024

Conversation

JelleZijlstra
Copy link
Contributor

The existing message was too verbose and arguably the compatibility
was in the wrong direction.

For comparison:

  • Pyre: Incompatible return type [7]: Expected str but got bool
  • Mypy: Incompatible return value type (got "bool", expected "str")
  • Pyright: Expression of type "Literal[False]" cannot be assigned to return type "None"

The existing message was too verbose and arguably the compatibility
was in the wrong direction.

For comparison:
- Pyre: Incompatible return type [7]: Expected `str` but got `bool`
- Mypy: Incompatible return value type (got "bool", expected "str")
- Pyright: Expression of type "Literal[False]" cannot be assigned to return type "None"
@JelleZijlstra JelleZijlstra merged commit 9de69d4 into quora:master Mar 2, 2024
9 checks passed
@JelleZijlstra JelleZijlstra deleted the readme branch March 2, 2024 00:31
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.

1 participant