Skip to content

Commit b040a74

Browse files
tclaude
andcommitted
fix(nwis): parameterize _reject_unexpected_format kwargs for mypy --strict
`kwargs: dict` tripped mypy's disallow-any-generics under the strict type-check CI, which runs against the PR merged into main. Annotate it as `dict[str, object]` -- a builtin generic that needs no `typing` import, so it stays ruff-clean on this branch (which predates main's `from typing import Any`) and avoids an add/add conflict on that import line when merged. Verified: mypy --strict and ruff both clean on the merge with main; the nwis suite (57) still passes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 5f46fff commit b040a74

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

dataretrieval/nwis.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,9 @@ def _parse_json_or_raise(response: httpx.Response) -> pd.DataFrame:
130130
raise
131131

132132

133-
def _reject_unexpected_format(kwargs: dict, func_name: str, expected: str) -> None:
133+
def _reject_unexpected_format(
134+
kwargs: dict[str, object], func_name: str, expected: str
135+
) -> None:
134136
"""Drop ``format`` from ``kwargs`` and reject any value other than ``expected``.
135137
136138
These getters always request a fixed ``format`` and parse that specific body,

0 commit comments

Comments
 (0)