-
-
Notifications
You must be signed in to change notification settings - Fork 133
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Bug report
When using python 3.11, instead of hardcoding HTTP verbs, now we can use official enum: HTTPMethod as well as HTTPStatus for statuses
What's wrong
We would like to use it in decorators.action(methods=[HTTPMethod.POST]) for instance.
Currently it does not work and produce the following error:
error: List item 0 has incompatible type "Literal[HTTPMethod.POST]"; expected "Literal['GET', 'POST', 'DELETE', 'PUT', 'PATCH', 'TRACE', 'HEAD', 'OPTIONS', 'get', 'post', 'delete', 'put', 'patch', 'trace', 'head', 'options']" [list-item]How is that should be
No mypy error should be reported
System information
- OS: MacOS / Debian (docker)
pythonversion: 3.11djangoversion: 3.2.18mypyversion: 1.2.0django-stubsversion: 1.16.0djangorestframework-stubsversion: 1.10.0
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers