Skip to content

Changed from list to abstract Sequence type for http verbs #415

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

Merged

Conversation

namper
Copy link
Contributor

@namper namper commented May 12, 2023

Allows method decorator to not fail on tuple, as there is no reason to have methods mutable

I have made things!

Changed from list to abstract Sequence type for http verbs. while documentation uses list for declaring methods for action decorator, the actual implementation only uses fact that methods are Iterable, and they rebuild this list all over again for normalisation.

Documentation: https://www.django-rest-framework.org/api-guide/viewsets/#viewset-actions

namper and others added 2 commits May 12, 2023 21:09
Allows method decorator to not fail on tuple, as there is no reason to
have `methods` mutable
Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@sobolevn sobolevn merged commit 667f31d into typeddjango:master May 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants