Skip to content

Type the supervised task API and export SupervisedTaskFactory - #96

Merged
b-Tomas merged 2 commits into
mainfrom
b-Tomas/supervised-task-factory-type
Sep 9, 2026
Merged

b-Tomas merged 2 commits into
mainfrom
b-Tomas/supervised-task-factory-type

Conversation

@b-Tomas

@b-Tomas b-Tomas commented Sep 8, 2026

Copy link
Copy Markdown
Member

_create_supervised_task(name, coro_factory, restart_delay) left coro_factory untyped and exported no alias for its own signature. Every connector that injects the scheduler into a poller so the poller can run standalone in tests (omron_flowcore robot_manager.py, mir-fleet FleetData/MiRFleetMissionTracking) re-spells Callable[[str, Callable[[], Coroutine]], asyncio.Task] locally.

  • CoroutineFactory = Callable[[], Coroutine[Any, Any, None]]; _create_supervised_task and __supervise now type coro_factory with it.
  • SupervisedTaskFactory = Callable[[str, CoroutineFactory], asyncio.Task] exported from inorbit_connector.connector, so pollers type their injected scheduler parameter with it.

No runtime change. flake8, black and the test suite pass. No version bump.

🤖 Generated with Claude Code

b-Tomas and others added 2 commits September 8, 2026 17:17
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@b-Tomas b-Tomas self-assigned this Sep 8, 2026
@b-Tomas
b-Tomas merged commit c77fdfa into main Sep 9, 2026
13 checks passed
@b-Tomas
b-Tomas deleted the b-Tomas/supervised-task-factory-type branch September 9, 2026 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants