Skip to content

Conversation

sobolevn
Copy link
Member

Now two functions are not considered subtypes if:

  1. First returns TypeGuard, other returns bool. We respect subtyping direction here. TypeGuard is considered to be subtype of bool
  2. First returns TypeGuard[int], second returns TypeGuard[str]

Closes #11307

Copy link
Member Author

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

Thanks! Now it should be ready.

@hauntsaninja hauntsaninja merged commit 47d2ea5 into python:master Oct 30, 2021
@hauntsaninja
Copy link
Collaborator

Thank you!

@sobolevn
Copy link
Member Author

Thanks everyone!

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.

bool and TypeGuard incorrect match in @overload method
3 participants