intgr / drf-yasg-stubs

Typing stubs for drf-yasg library (PEP 484 stubs for Mypy and PyCharm)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

permission_classes type on get_schema_view

palfrey opened this issue · comments

I've got some code that sets the permission_classes arg for get_schema_view to (permissions.AllowAny,), and I get the error
error: Argument "permission_classes" to "get_schema_view" has incompatible type "Tuple[Type[AllowAny]]"; expected "Optional[Tuple[str]]"

Admittedly, in my particular use case it turns out I can delete the arg as it's the defaults, but if I wanted a non-default I'd get issues with mypy.

Thanks, released 0.1.2 with a fix.