[-] Removed var narrowing (from the main scope)

This commit is contained in:
Charles Le Maux 2024-09-10 13:29:00 +02:00
parent a5ab9a0caa
commit 4daf2ed654

6
app.py
View File

@ -72,7 +72,7 @@ def authenticate_request(data: dict):
def parse_and_validate_request(parameters: list[str]) -> Union[list[str], None]: def parse_and_validate_request(parameters: list[str]) -> Union[list[str], None]:
args = [] fn_args = []
data = request.get_json() data = request.get_json()
if not data: if not data:
raise Exception("Empty request body.") raise Exception("Empty request body.")
@ -82,8 +82,8 @@ def parse_and_validate_request(parameters: list[str]) -> Union[list[str], None]:
if name not in data: if name not in data:
raise Exception(f"Missing parameter {name}") raise Exception(f"Missing parameter {name}")
value = data[name] value = data[name]
args.append(value) fn_args.append(value)
return args return fn_args
route_handlers = { route_handlers = {