1
0
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:
Adolfo Gómez García 2024-09-08 21:42:04 +02:00
parent 103978955f
commit 6203ffca2c
No known key found for this signature in database
GPG Key ID: DD1ABF20724CDA23

View File

@ -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
"""