mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-09-16 05:10:42 -07:00
The suite hadn't run green since the routes refactor: - test_profile_duplicate_names.py imported the pre-refactor module layout and broke collection; now imports backend.services.profiles - tests/conftest.py puts the repo root and backend dir on sys.path so files collect standalone instead of depending on run order - test_cors.py tested a hand-copied mirror of the origin list that had drifted from app.py (missing http://tauri.localhost); it now builds the app via the real create_app() factory - test_progress.py simulated a 1KB download, below the tracker's 1MB reporting threshold; simulation raised to 5MB - slow/timeout markers registered in pyproject Ruff: ~900 violations auto-fixed (typing modernization, import sorting, unused imports, whitespace). The remaining rules are baselined in pyproject.toml with per-rule counts to burn down, plus per-file carve-outs for deliberate env-before-import ordering. ruff check is now clean; suite is 134 passed, 2 skipped.
23 lines
640 B
Python
23 lines
640 B
Python
"""Platform defaults for capture hotkey chords."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import sys
|
|
|
|
MAC_PUSH_TO_TALK = ["MetaRight", "AltGr"]
|
|
MAC_TOGGLE_TO_TALK = ["MetaRight", "AltGr", "Space"]
|
|
NON_MAC_PUSH_TO_TALK = ["ControlRight", "ShiftRight"]
|
|
NON_MAC_TOGGLE_TO_TALK = ["ControlRight", "ShiftRight", "Space"]
|
|
|
|
|
|
def default_push_to_talk_chord() -> list[str]:
|
|
if sys.platform == "darwin":
|
|
return MAC_PUSH_TO_TALK.copy()
|
|
return NON_MAC_PUSH_TO_TALK.copy()
|
|
|
|
|
|
def default_toggle_to_talk_chord() -> list[str]:
|
|
if sys.platform == "darwin":
|
|
return MAC_TOGGLE_TO_TALK.copy()
|
|
return NON_MAC_TOGGLE_TO_TALK.copy()
|