Type error when using the generated `from_dict` method with pytypes
smarie opened this issue · 0 comments
smarie commented
When using pytypes type checker with the from_dict
method generated by @autoclass/@autodict:
from pytypes import typechecked
from autoclass import autoclass
@typechecked
@autoclass
class Foo:
def __init__(self, foo):
pass
Foo.from_dict(dict(foo=1))
returns
pytypes.exceptions.InputTypeError:
classmethod autoclass.autodict.Foo.from_dict
called with incompatible types:
Expected: Tuple[Dict]
Received: Tuple[Dict[str, int]]