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
Literal
After we have delegate in-place we can use Literal types.
delegate
But, now they are not supported. Ideally, something like this should work:
from classes import typeclass, AssociatedType, Supports from typing_extensions import Literal class SomeDelegate(object): ... # TODO: write proper `__instancecheck__` class A(AssociatedType): ... @typeclass(A) def some(instance) -> int: ... @some.instance(Literal[1], delegate=SomeDelegate) def _some_tuple(instance: Literal[1]) -> int: return instance def test(i: Supports[A]): return some(i) some(1)
The text was updated successfully, but these errors were encountered:
Type[]
TypedDict
No branches or pull requests
After we have
delegate
in-place we can useLiteral
types.But, now they are not supported.
Ideally, something like this should work:
The text was updated successfully, but these errors were encountered: