Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

permission_classes type on get_schema_view #6

Closed
palfrey opened this issue Aug 19, 2020 · 1 comment · Fixed by #7
Closed

permission_classes type on get_schema_view #6

palfrey opened this issue Aug 19, 2020 · 1 comment · Fixed by #7

Comments

@palfrey
Copy link

palfrey commented Aug 19, 2020

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 intgr closed this as completed in #7 Aug 19, 2020
intgr added a commit that referenced this issue Aug 19, 2020
…asses (#6)

Also removed redundant & wrong attributes declared in _SchemaView class, they are now inherited from APIView.
@intgr
Copy link
Owner

intgr commented Aug 19, 2020

Thanks, released 0.1.2 with a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants