1414 MalformedAuthHeaderError ,
1515)
1616
17- _LOGGER = logging .getLogger (__name__ )
17+ _LOGGER = logging .getLogger (name = __name__ )
1818
1919if TYPE_CHECKING :
2020 from mock_vws .database import VuforiaDatabase
2121
2222
23- def validate_auth_header_exists (request_headers : dict [str , str ]) -> None :
23+ def validate_auth_header_exists (* , request_headers : dict [str , str ]) -> None :
2424 """
2525 Validate that there is an authorization header given to the query endpoint.
2626
@@ -38,6 +38,7 @@ def validate_auth_header_exists(request_headers: dict[str, str]) -> None:
3838
3939
4040def validate_auth_header_number_of_parts (
41+ * ,
4142 request_headers : dict [str , str ],
4243) -> None :
4344 """
@@ -61,6 +62,7 @@ def validate_auth_header_number_of_parts(
6162
6263
6364def validate_client_key_exists (
65+ * ,
6466 request_headers : dict [str , str ],
6567 databases : set [VuforiaDatabase ],
6668) -> None :
@@ -106,6 +108,7 @@ def validate_auth_header_has_signature(
106108
107109
108110def validate_authorization (
111+ * ,
109112 request_path : str ,
110113 request_headers : dict [str , str ],
111114 request_body : bytes ,
@@ -134,8 +137,8 @@ def validate_authorization(
134137 request_path = request_path ,
135138 databases = databases ,
136139 )
137- except ValueError :
140+ except ValueError as exc :
138141 _LOGGER .warning (
139142 msg = "The authorization header does not match any databases." ,
140143 )
141- raise AuthenticationFailureError from ValueError
144+ raise AuthenticationFailureError from exc
0 commit comments