Skip to content

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

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

DawnofGenX wants to merge 3 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

Copy link
Copy Markdown
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

scipy-stubs (https://github.com/scipy/scipy-stubs)
+ tests/misc/test_submodules_empty.pyi:3: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports

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