You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I am part of the development team on OpenAI/gym which we are slowly adding type hinting.
Recently I found this repo and thought it would be a great way of testing the type hinting is correct
However, in part of the code we get the following error with typeguard
To Reproduce
fromtypingimportCallablefromtypeguardimporttypechecked@typecheckeddeffn_generator(name: str) ->Callable[..., object]:
# The actual code we want to run# >>> mod_name, attr_name = name.split(":")# >>> mod = importlib.import_module(mod_name)# >>> fn = getattr(mod, attr_name)# >>> return fn# Example code for testingdeff(**kwargs):
return1returnffn_generator("a")
Expected behavior
From my understanding, ... is the correct way of type hinting a callable with unknown args and kwargs python/mypy#5876
Is this correct? Or is there alternative way that typeguard expects
The text was updated successfully, but these errors were encountered:
Describe the bug
I am part of the development team on OpenAI/gym which we are slowly adding type hinting.
Recently I found this repo and thought it would be a great way of testing the type hinting is correct
However, in part of the code we get the following error with typeguard
To Reproduce
Expected behavior
From my understanding,
...
is the correct way of type hinting a callable with unknownargs
andkwargs
python/mypy#5876
Is this correct? Or is there alternative way that typeguard expects
The text was updated successfully, but these errors were encountered: