You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
/task handler re-encodes valid task kinds as a tuple with a type: ignore instead of TaskManager validating TaskKind #33
The /task handler spells the valid kinds as the literal tuple ("search", "fetch") and silences the resulting mismatch with # type: ignore[arg-type], while TaskManager.add does no validation of its TaskKind.
Cost: the kind set is independently spelled in tasks.py's TaskKind Literal, _probe's branch, the app tuple, the usage string, and _HELP — adding a third kind (e.g. research) requires synchronized edits in 5 places, and the type: ignore hides any drift until a confusing runtime usage error.
Suggested fix: have TaskManager.add validate against a single source of truth (e.g. typing.get_args(TaskKind)) and derive the TUI's tuple/usage text from it; drop the ignore.
Activity
CryptoJones commentedon Jun 15, 2026
Fixed:
_cmd_taskderives valid kinds fromget_args(TaskKind)and usescast, dropping the literal tuple + type: ignore (tui/app.py:324,335).