Skip to content

Add ASYNC128 task-status-never-started - #474

Open
Zac-HD wants to merge 1 commit into
python-trio:mainfrom
Zac-HD:claude/flake8-async-new-lint-rule-8x3p0c
Open

Add ASYNC128 task-status-never-started#474
Zac-HD wants to merge 1 commit into
python-trio:mainfrom
Zac-HD:claude/flake8-async-new-lint-rule-8x3p0c

Conversation

@Zac-HD

@Zac-HD Zac-HD commented Aug 15, 2026

Copy link
Copy Markdown
Member

Warns about startable functions (i.e. taking a task_status parameter, or a parameter annotated as TaskStatus) that never call task_status.started(), which makes nursery.start() / TaskGroup.start() calls on them fail or block forever.

The check is intentionally strict, per the issue: passing task_status on to a helper function or aliasing it does not count, and any direct call counts regardless of reachability. Stub bodies (overloads, protocols, abstract methods) are excluded.

Closes #471.

Warns about startable functions (i.e. taking a `task_status` parameter,
or a parameter annotated as `TaskStatus`) that never call
`task_status.started()`, which makes `nursery.start()` /
`TaskGroup.start()` calls on them fail or block forever.

The check is intentionally strict, per the issue: passing `task_status`
on to a helper function or aliasing it does not count, and any direct
call counts regardless of reachability. Stub bodies (overloads,
protocols, abstract methods) are excluded.

Closes python-trio#471

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EJGxyMtQSge3dVQpw19rZX
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.

Detect TaskStatus not being used

2 participants