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

Disallow to use TypeGuard type outside of .ret_type, refs #11765 #11790

Closed
wants to merge 2 commits into from
Closed

Disallow to use TypeGuard type outside of .ret_type, refs #11765 #11790

wants to merge 2 commits into from

Conversation

sobolevn
Copy link
Member

Now TypeGuard is required to be in the function's return type position. In other places it is just a bool type. But, we start to raise an error.

To be honest, PEP does not mention this, but I think that it is a reasonable thing to do.
Closes #11765

CC @erictraut

@sobolevn
Copy link
Member Author

@97littleleaf11 @hauntsaninja any feedback? 🙂

This pull request was closed.
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.

no error when using TypeGuard outside of return type
2 participants