Skip to content

Narrow down PLC0415 global ignore to per-file-ignores in pyproject.toml #2297

@arkid15r

Description

@arkid15r

Description:

Currently, our Ruff configuration globally ignores PLC0415 https://docs.astral.sh/ruff/rules/import-outside-top-level/

We should narrow this down by removing the global ignore and specifying only the files that actually need it via per-file-ignores in pyproject.toml. This will keep the rule enabled everywhere else while still allowing necessary exceptions.

This will help us:

  • Maintain stricter linting rules across the project.
  • Prevent accidental top-level import violations.
  • Improve long-term code health and maintainability.

Acceptance Criteria:

  • Identify all files currently triggering PLC0415.
  • Update pyproject.toml to include per-file-ignores for those files.
  • Remove the global PLC0415 ignore from the Ruff configuration.
  • Confirm Ruff passes cleanly with the new configuration.

Are you going to work on implementing this?

  • Yes
  • No

Metadata

Metadata

Assignees

Type

No type

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions