Autogenerated type safety parameterisation of all methods

This commit is contained in:
Ian Renton
2026-09-20 20:02:19 +01:00
parent 6037e742cc
commit 324dd1414b
132 changed files with 1228 additions and 706 deletions
+5 -1
View File
@@ -1,5 +1,9 @@
from __future__ import annotations
from dataclasses import dataclass
from tornado.httputil import HTTPHeaders
@dataclass
class LookupCredentials:
@@ -13,7 +17,7 @@ class LookupCredentials:
hamqth_session_id: str = "" # alternative to username/password
def extract_credentials(headers):
def extract_credentials(headers: HTTPHeaders) -> LookupCredentials | None:
"""Build a LookupCredentials from HTTP request headers; returns None if no usable credentials are present."""
creds = LookupCredentials(
qrz_username=headers.get("X-QRZ-Username", ""),