auth: Migrate to @typed_endpoint.

Since this is the last has_request_variables endpoint outside tests,
more test_openapi code needs to be deleted in this transition.
This commit is contained in:
bedo
2024-07-17 01:56:17 +03:00
committed by Tim Abbott
parent a8ecba8ab8
commit 3da91e951c
3 changed files with 61 additions and 88 deletions

View File

@@ -324,7 +324,7 @@ def has_request_variables(
) -> Callable[Concatenate[HttpRequest, ParamT], ReturnT]:
num_params = req_func.__code__.co_argcount
default_param_values = cast(FunctionType, req_func).__defaults__
if default_param_values is None:
if default_param_values is None: # nocoverage # No users of this path.
default_param_values = ()
num_default_params = len(default_param_values)
default_param_names = req_func.__code__.co_varnames[num_params - num_default_params :]
@@ -392,7 +392,7 @@ def has_request_variables(
if req_var in request.POST:
val = request.POST[req_var]
request_notes.processed_parameters.add(req_var)
elif req_var in request.GET:
elif req_var in request.GET: # nocoverage # No users of this path
val = request.GET[req_var]
request_notes.processed_parameters.add(req_var)
else: