code-buster 0.12.0

Repository-aware static analysis for AI-assisted development
Documentation
{
  "id": "py-import-not-top",
  "language": "python",
  "group": "style",
  "listingTitle": "Py import not top",
  "title": "Review import not top",
  "mvvm": false,
  "defaultSeverity": "info",
  "legacyGroup": "nim-style",
  "why": "Imports after executable module code can make dependency loading conditional or order-dependent.",
  "suggestion": "Keep ordinary imports in the module preamble; retain local imports only when delayed loading is intentional.",
  "version": 4,
  "semanticMaturity": "text",
  "securityKind": "none",
  "taxonomy": [
    "style"
  ],
  "requirements": [
    "sourceText"
  ],
  "packs": [
    "python",
    "fastapi"
  ],
  "implementation": "src/languages/python/rules.rs",
  "languages": [
    "python"
  ],
  "frameworks": [],
  "languageVersions": [],
  "limitations": [
    "Imports inside TYPE_CHECKING blocks and imports following a top-level TYPE_CHECKING preamble are accepted.",
    "The rule does not infer whether other late imports intentionally avoid cycles or optional dependencies."
  ]
}