code-buster 0.12.0

Repository-aware static analysis for AI-assisted development
Documentation
{
  "id": "py-asyncio-dangling-task",
  "language": "python",
  "group": "reliability",
  "listingTitle": "Retain created asyncio tasks",
  "title": "Retain created asyncio tasks",
  "mvvm": false,
  "defaultSeverity": "warn",
  "legacyGroup": "reliability",
  "why": "The event loop keeps weak task references, so a discarded task can disappear before completion and its exception can be lost.",
  "suggestion": "Await the task, retain it until completion, or use asyncio.TaskGroup for structured concurrency.",
  "version": 3,
  "semanticMaturity": "token",
  "securityKind": "none",
  "taxonomy": ["reliability"],
  "requirements": ["sourceText"],
  "packs": ["python", "fastapi"],
  "implementation": "src/languages/python/rules.rs",
  "languages": ["python"],
  "frameworks": [],
  "languageVersions": [],
  "limitations": [
    "Only discarded direct asyncio.create_task and asyncio.ensure_future expression statements are reported.",
    "Tasks nested in assignments, collection construction or mutation, awaits, and other retaining expressions are excluded.",
    "Statements suppressed with noqa RUF006 are treated as reviewed intentional task detachment.",
    "Imported aliases and custom task factories are not inferred."
  ]
}