Skip to content

Tighten ruff config: enable F841, scope the F401 ignore to __init__.py #138

Description

@johnnichev

Tighten the ruff lint config

[tool.ruff.lint] selects F (pyflakes) but globally ignores F401 (unused imports) and F841 (unused local variables) in pyproject.toml. That's why dead locals and stray imports aren't caught in CI.

  • F401 is only justified for __init__.py re-exports — move it from the global ignore to [tool.ruff.lint.per-file-ignores] for **/__init__.py so real unused imports elsewhere are flagged.
  • F841 has no good reason to be ignored — enable it (remove from ignore).

Acceptance

  • F841 enabled, F401 scoped to __init__.py.
  • Fix any violations that surface (a handful of unused imports + the dead locals — coordinate with the dead-code removal issue).
  • ruff check src/ tests/ clean; CI green.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cleanupCode cleanup, refactoring, dead-code removalgood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions