Add YAPF style + ignore, and format tracked Python files

This commit is contained in:
2025-12-29 18:42:02 -08:00
parent c019c00aed
commit 507946a3e4
108 changed files with 11664 additions and 6494 deletions

View File

@@ -47,8 +47,10 @@ class LOCClient:
*,
start: int = 1,
count: int = 25,
extra_params: Optional[Dict[str, Any]] = None,
) -> Dict[str, Any]:
extra_params: Optional[Dict[str,
Any]] = None,
) -> Dict[str,
Any]:
"""Search the Chronicling America collection via LoC JSON API.
Args:
@@ -63,14 +65,17 @@ class LOCClient:
q = str(query or "").strip()
if not q:
return {"results": []}
return {
"results": []
}
params: Dict[str, Any] = {
"q": q,
"fo": "json",
"c": int(count) if int(count) > 0 else 25,
"sp": int(start) if int(start) > 0 else 1,
}
params: Dict[str,
Any] = {
"q": q,
"fo": "json",
"c": int(count) if int(count) > 0 else 25,
"sp": int(start) if int(start) > 0 else 1,
}
if extra_params:
for k, v in extra_params.items():
if v is None: