Skip to content

Clean up test suite formatting and annotations#164

Merged
IrishPrime merged 1 commit into
mainfrom
141/test-cleanup
May 9, 2026
Merged

Clean up test suite formatting and annotations#164
IrishPrime merged 1 commit into
mainfrom
141/test-cleanup

Conversation

@IrishPrime

Copy link
Copy Markdown
Owner

Three small, mechanical hygiene fixes that have been accumulating in the test suite:

  1. Drop the unused import nielsen.config from tests/test_tvmaze.py.
  2. Tighten bare dict and list[dict] annotations across tests/test_tvmaze.py to dict[str, Any] / list[dict[str, Any]]. Bare dict infers as dict[Any, Any], which silently allows wrong-shaped fixtures through; the tighter form documents the expected JSON shape.
  3. Reformat multi-line assert ..., "msg" statements to the parenthesized-message style preferred by Ruff's default formatter (one occurrence in test_tv.py, five in test_tvmaze.py).

Resolve #141.

Three small, mechanical hygiene fixes that have been accumulating in
the test suite:

1. Drop the unused `import nielsen.config` from `tests/test_tvmaze.py`.
2. Tighten bare `dict` and `list[dict]` annotations across
   `tests/test_tvmaze.py` to `dict[str, Any]` / `list[dict[str, Any]]`.
   Bare `dict` infers as `dict[Any, Any]`, which silently allows
   wrong-shaped fixtures through; the tighter form documents the
   expected JSON shape.
3. Reformat multi-line `assert ..., "msg"` statements to the
   parenthesized-message style preferred by Ruff's default formatter
   (one occurrence in `test_tv.py`, five in `test_tvmaze.py`).

Resolve #141.
@IrishPrime IrishPrime self-assigned this May 9, 2026
@IrishPrime IrishPrime merged commit 14390a9 into main May 9, 2026
3 checks passed
@IrishPrime IrishPrime deleted the 141/test-cleanup branch May 9, 2026 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test-suite cleanup: unused imports, generic tightening, assert formatting

1 participant