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
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,17 @@ warn_redundant_casts = true
warn_return_any = true
check_untyped_defs = true
no_implicit_optional = true
disallow_untyped_defs = true

[[tool.mypy.overrides]]
# Third-party deps without inline type stubs.
module = ["kokoro_onnx", "sounddevice", "soundfile"]
ignore_missing_imports = true

[[tool.mypy.overrides]]
# Tests use pytest-mock's mocker.patch which returns Any-heavy values; don't
# require full strictness there.
# Tests rely on pytest-mock's `mocker` (Any-heavy) and pytest fixtures with
# implicit Any-typed kwargs. Strict untyped-def bans buy little here, so
# tests stay on the looser config.
module = "tests.*"
disallow_untyped_defs = false

Expand Down
5 changes: 4 additions & 1 deletion stackvox/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ def _read_default_device() -> int:

last_device = [_read_default_device()]

def _on_device_change(obj_id: int, n: int, addrs, data) -> int:
def _on_device_change(obj_id: int, n: int, addrs: Any, data: Any) -> int:
# `addrs` is a ctypes.POINTER(_PropAddr); `data` is a c_void_p — neither
# is needed because we already know which property fired (only one is
# registered) and we re-read the device ID directly.
try:
current = _read_default_device()
if current and current != last_device[0]:
Expand Down