Skip to content
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

__call__ in dispatcher only checks *args types #126

Open
ZMarouani opened this issue Feb 10, 2023 · 2 comments
Open

__call__ in dispatcher only checks *args types #126

ZMarouani opened this issue Feb 10, 2023 · 2 comments

Comments

@ZMarouani
Copy link

Calling decorated with dispatch functions with key value arguments will always throw "could not find signature for .." because call only checks *args types and not **kwargs , please fix in dispatcher.py line 267 (https://github.com/mrocklin/multipledispatch/blob/master/multipledispatch/dispatcher.py)

@wboughattas
Copy link

agreed! I encountered the same error and led me also to Line267. I hope it gets fixed asap

ImahnShekhzadeh added a commit to ImahnShekhzadeh/multipledispatch that referenced this issue Sep 13, 2023
@ImahnShekhzadeh
Copy link

@ZMarouani @wboughattas I modified the code in L267 and 432 by doing this:

types_args = tuple([type(arg) for arg in args])
types = (
    types_args + tuple(list(type(kwarg) for kwarg in kwargs.values()))
)
func = self.dispatch(*types)

But I now get keyword argument errors... Did you manage to solve this issue?

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

No branches or pull requests

3 participants