We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeGuard
TypeVar
Any
bool
topic-typeguard TypeGuard / PEP 647 topic-type-variables
from typing import TypeGuard, TypeVar, Callable T = TypeVar("T") def guard(x: object) -> TypeGuard[str]: return True def f(fn: Callable[[object], T]) -> T: return fn(1) reveal_type(f(guard)) # Any
This should be bool, not Any
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
topic-typeguardTypeGuard / PEP 647
topic-type-variables
This should be
bool
, notAny
TypeGuard
s incorrectly become the guard type when passed to aTypeVar
聽#17114The text was updated successfully, but these errors were encountered: