mirror of
https://github.com/dkmstr/openuds.git
synced 2025-03-12 04:58:34 +03:00
Refactor dispatch method in REST view to include type hints and clarify request type
This commit is contained in:
parent
103978955f
commit
6203ffca2c
@ -78,7 +78,8 @@ class Dispatcher(View):
|
||||
|
||||
# pylint: disable=too-many-locals, too-many-return-statements, too-many-branches, too-many-statements
|
||||
@method_decorator(csrf_exempt)
|
||||
def dispatch(self, request: 'ExtendedHttpRequestWithUser', *args, **kwargs):
|
||||
# We know for sure that request is an ExtendedHttpRequestWithUser because of an middleware that is applied to all requests
|
||||
def dispatch(self, request: 'ExtendedHttpRequestWithUser', *args: typing.Any, **kwargs: typing.Any) -> http.HttpResponse: # type: ignore
|
||||
"""
|
||||
Processes the REST request and routes it wherever it needs to be routed
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user