FelixTheC / strongtyping

Decorator which checks whether the function is called with the correct type of parameters.
https://pypi.org/project/strongtyping/
107 stars 3 forks source link

Wrong type for classes decorated with match_class_typing #64

Closed FelixTheC closed 3 years ago

FelixTheC commented 3 years ago
@match_class_typing
class Foo:
    def __init__(self, val: int):
        self.val = val

@match_typing
def bar(some_class: Foo)
    pass

# will raise a wrong TypeMisMatch
bar(Foo(10))