Skip to content

docs: remove linter-owned rules from AGENTS.md #609

Description

@myakove

Problem

AGENTS.md duplicates rules already enforced by pre-commit tools. That wastes AI context and creates drift risk.

Root cause

  • No Inline Imports is fully enforced by ruff PLC0415
  • str = Nonestr | None = None is enforced by mypy no_implicit_optional
  • Broader type-annotation guidance (Any justified, complete annotations) is only partially covered by mypy and must stay

Proposed approach

  1. Drop the full No Inline Imports (MUST) section from AGENTS.md; replace with a short one-liner pointing to ruff PLC0415 (and note TYPE_CHECKING exception if still useful)
  2. Delete only the sentence under Type Annotations about default None / str | None
  3. Keep Type Annotations MUST for complete annotations + justified Any
  4. Update any cross-references to "No Inline Imports" (e.g. conftest placement section)

Out of scope

  • Security-related hooks/rules
  • Adding new ruff rules (UP006/UP035) — separate follow-up
  • Automating other AGENTS.md rules

Done

  • No Inline Imports full section removed or reduced to PLC0415 one-liner
  • str = None sentence removed from Type Annotations
  • Complete annotations + justified Any guidance retained
  • Cross-references to "No Inline Imports" updated
  • Pre-commit passes

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