Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/test_agent_audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def test_null_player_is_a_noop_player():
p.close() # none of these raise or open a device


def test_default_duplex_stream_opens_started_rawstream(monkeypatch):
def test_default_duplex_stream_opens_started_rawstream(monkeypatch) -> None:
created = {}

class FakeRaw:
Expand Down Expand Up @@ -188,7 +188,7 @@ def test_default_duplex_stream_missing_sounddevice_raises_mic_missing(monkeypatc
assert exc.value.error_type == "mic_missing"


def test_default_duplex_stream_open_failure_raises_audio_output_error(monkeypatch):
def test_default_duplex_stream_open_failure_raises_audio_output_error(monkeypatch) -> None:
def boom(**kw):
raise OSError("device busy")

Expand Down
2 changes: 1 addition & 1 deletion tests/test_agent_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ def close(self):
assert ("user_final", "SHOULD NOT BE SEEN") not in finals # stopped after the reply


def test_run_session_ws_url_follows_active_environment():
def test_run_session_ws_url_follows_active_environment() -> None:
# The Voice Agent socket must target the active environment's host, not a
# hardcoded production URL. Capture the URL connect() is handed, short-
# circuiting with a benign close once we've seen it.
Expand Down
2 changes: 1 addition & 1 deletion tests/test_code_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ class _Stub:
content_safety: ClassVar[object] = type("CS", (), {"summary": {"profanity": 0.1}})()


def test_every_snippet_execs_against_a_realistic_transcript():
def test_every_snippet_execs_against_a_realistic_transcript() -> None:
# Enable every feature so result_handling emits all snippets, then exec them.
all_on: dict[str, object] = {
"speaker_labels": True,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_doctor.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def query_devices(self):
assert doctor._probe_input_devices() == 1


def test_render_ok_payload_shows_ready():
def test_render_ok_payload_shows_ready() -> None:
payload: doctor.DoctorResult = {
"ok": True,
"checks": [
Expand All @@ -174,7 +174,7 @@ def test_render_ok_payload_shows_ready():
assert "Everything looks good." in text


def test_render_problem_payload_shows_fix_and_problem_banner():
def test_render_problem_payload_shows_fix_and_problem_banner() -> None:
payload: doctor.DoctorResult = {
"ok": False,
"checks": [
Expand Down
2 changes: 1 addition & 1 deletion tests/test_init_template_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def test_frontend_routes_exist_in_backend(template_dir):
)


def test_requirements_cover_backend_imports(template_dir):
def test_requirements_cover_backend_imports(template_dir) -> None:
"""Every third-party import in api/*.py appears in requirements.txt."""
imports: set[str] = set()
for path in (template_dir / "api").glob("*.py"):
Expand Down
8 changes: 4 additions & 4 deletions tests/test_microphone.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def fake_factory(*, sample_rate, device):
assert seen["rate"] == 32000


def test_device_default_rate_reads_device(monkeypatch):
def test_device_default_rate_reads_device(monkeypatch) -> None:
fake_sd: Any = types.ModuleType("sounddevice")
fake_sd.query_devices = lambda device, kind: {"default_samplerate": 44100.0}
monkeypatch.setitem(sys.modules, "sounddevice", fake_sd)
Expand All @@ -182,7 +182,7 @@ def test_resample_pcm16_uses_16bit_mono_params():
assert out != chunk # 48k -> 24k actually changes the data


def test_device_default_rate_falls_back_on_query_error(monkeypatch):
def test_device_default_rate_falls_back_on_query_error(monkeypatch) -> None:
fake_sd: Any = types.ModuleType("sounddevice")

def boom(*a, **k):
Expand All @@ -193,7 +193,7 @@ def boom(*a, **k):
assert _device_default_rate(None) == _FALLBACK_RATE


def test_device_default_rate_falls_back_on_non_numeric_rate(monkeypatch):
def test_device_default_rate_falls_back_on_non_numeric_rate(monkeypatch) -> None:
fake_sd: Any = types.ModuleType("sounddevice")
fake_sd.query_devices = lambda device, kind: {"default_samplerate": object()}
monkeypatch.setitem(sys.modules, "sounddevice", fake_sd)
Expand All @@ -210,7 +210,7 @@ def test_sounddevice_mic_yields_bytes_then_stops_and_closes():
assert stream.stopped and stream.closed


def test_default_mic_stream_opens_started_sounddevice_stream(monkeypatch):
def test_default_mic_stream_opens_started_sounddevice_stream(monkeypatch) -> None:
created = {}

def raw_input_stream(**kwargs):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_setup_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from aai_cli.steps import Step


def test_render_steps_colors_status():
def test_render_steps_colors_status() -> None:
data: dict[str, list[Step]] = {
"steps": [
{"name": "mcp", "status": "installed", "detail": "/path"},
Expand Down
2 changes: 1 addition & 1 deletion tests/test_steps.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from aai_cli import steps


def test_render_steps_includes_name_status_detail():
def test_render_steps_includes_name_status_detail() -> None:
data: list[steps.Step] = [
{"name": "scaffold", "status": "created", "detail": "./my-app"},
{"name": "install", "status": "skipped", "detail": "--no-install"},
Expand Down
2 changes: 1 addition & 1 deletion tests/test_stream_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def boom(*_args, **_kwargs):
assert closed["n"] >= 1


def test_stream_system_audio_uses_macos_source(monkeypatch):
def test_stream_system_audio_uses_macos_source(monkeypatch) -> None:
config.set_api_key("default", "sk_live")
source_types: list[str] = []
rates: list[int] = []
Expand Down
Loading