FelixTheC / strongtyping

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

issue with functool.partials #40

Closed FelixTheC closed 4 years ago

FelixTheC commented 4 years ago
from django.urls.conf import path as url_path

@match_typing
def swagger_from_url(self, urlpatterns: List[url_path]):
    pass

path = partial(_path, Pattern=RoutePattern)

leads to AttributeError: 'functools.partial' object has no attribute '_subs_tree'

FelixTheC commented 4 years ago

is not really an issue. Use

from django.urls import URLPattern

@match_typing
def swagger_from_url(self, urlpatterns: List[URLPattern]):
    pass