-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Support Type[]
type with delegate
#275
Comments
In fact we cannot express the example below without delegate too since @some.instance(Type[MyClass])
def _some_type_myclass(instance: Type[MyClass]) -> int: ... What's the goal of this issue, enable |
Yes, you are right! It should be: @some.instance(delegate=MyTypeDelegate)
def _some_type_myclass(instance: Type[MyClass]) -> int: ... |
So, what we need to do here? Like, the delegated classes are something that the users pass and that have the highest priority when we're evaluating the values |
We need to make sure that the example above works and type-checks 🙂 |
I'd like to propose that we provide some delegate classes. Like this one that will check a Type because in order to do that check the users must know how to use
|
@thepabloaguilar great idea! Please, create a new issue for that! 👍 |
Currently, we cannot express something like:
We can only dispatch on
type
and that's it.I think that this feature is useful.
Related #264
Related #274
The text was updated successfully, but these errors were encountered: