The project config enables strict mypy, but PYTHONPATH=src python -m mypy src tests fails because client.audio.transcription(...) is typed as APIResponse and the test accesses .text. APIResponse only declares id, object, data, and status, so the checked-in strict type check is broken. Fix by adding a typed transcription response model or declaring the text field on the returned model.
File: tests/test_client.py
Line: 165
Severity: high
Summary: apiresponse text attribute breaks strict mypy
The project config enables strict mypy, but
PYTHONPATH=src python -m mypy src testsfails becauseclient.audio.transcription(...)is typed asAPIResponseand the test accesses.text.APIResponseonly declaresid,object,data, andstatus, so the checked-in strict type check is broken. Fix by adding a typed transcription response model or declaring thetextfield on the returned model.File:
tests/test_client.pyLine: 165
Severity: high
Summary: apiresponse text attribute breaks strict mypy