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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeExpr
def f(t: TypeExpr[T]) -> T: ... reveal_type(f(int | str)) # int | str a: TypeExpr[int | str] a = int | str # valid UnionType a = int # valid int a = 1 # valid, bare literal a = object # invalid, object isn't a subtype of int | str
I can imagine a lot of cases where there is ambiguous stuff like t: TypeExpr[Any], so we can just ban those ones.
t: TypeExpr[Any]
The text was updated successfully, but these errors were encountered:
SpecialForm
found another use case in the wild:
def cast_lambda(type: TypeExpr[Callable[P, R]], fn: Callable[P, R]) -> Callable[P, R]: ...
Sorry, something went wrong.
TypeForm
No branches or pull requests
I can imagine a lot of cases where there is ambiguous stuff like
t: TypeExpr[Any]
, so we can just ban those ones.The text was updated successfully, but these errors were encountered: