intgr / drf-yasg-stubs

Typing stubs for drf-yasg library (PEP 484 stubs for Mypy and PyCharm)
Other
5 stars 3 forks source link

permission_classes type on get_schema_view #6

Closed palfrey closed 4 years ago

palfrey commented 4 years ago

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.

intgr commented 4 years ago

Thanks, released 0.1.2 with a fix.