Skip to content

RFC: enforce import-outside-top-level rule #8

@trisdoan

Description

@trisdoan

Summary

Add PLC0415 (import-outside-top-level) to template/ruff.toml.

Reasons

  • Enforce consistent import discipline across template-based projects
  • Catch imports hidden inside functions with no good reason
  • TID253 not needed — all current projects use lightweight deps, no lazy loading required
  • Legitimate exceptions use # noqa: PLC0415

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions