Skip to content

feat: add unused-asyncio-task error code - #22198

Open
DawnofGenX wants to merge 4 commits into
python:masterfrom
DawnofGenX:unused-asyncio-task
Open

DawnofGenX wants to merge 4 commits into
python:masterfrom
DawnofGenX:unused-asyncio-task

Conversation

@DawnofGenX

Copy link
Copy Markdown

Summary

Add unused-asyncio-task error code to detect when an asyncio.Task is created but never awaited, which is a common source of bugs.

Changes

  • New error code unused-asyncio-task in mypy/checker.py
  • Detection logic for unawaited asyncio.Task assignments
  • Tests and documentation

Verification

  • New tests pass
  • Existing asyncio-related tests unaffected

@github-actions

This comment has been minimized.

Fixes the docs CI check (VERIFY_MYPY_ERROR_CODES) which requires every
error code to have a _code-<name> reference in the documentation.
@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

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.

1 participant