Summary
Enable the Ruff SIM (flake8-simplify) checks family in the project lint configuration.
Rationale
The current review identified nested context managers that Ruff rule SIM117 can simplify. Enabling the complete SIM checks family will detect similar maintainability issues consistently during local development and continuous integration.
Affected areas
- Ruff configuration
- Existing Python source and test files that fail newly enabled
SIM rules
Required changes
- Update the Ruff configuration to enable the
SIM checks family.
- Run Ruff against the repository.
- Apply minimal code changes for any newly reported valid
SIM findings.
- Document any intentional exclusions in the Ruff configuration, if exclusions are necessary.
Acceptance criteria
- Ruff selects the
SIM checks family.
- The repository passes Ruff with the enabled checks.
- Any exclusions have a documented reason.
Backlinks
Summary
Enable the Ruff
SIM(flake8-simplify) checks family in the project lint configuration.Rationale
The current review identified nested context managers that Ruff rule
SIM117can simplify. Enabling the completeSIMchecks family will detect similar maintainability issues consistently during local development and continuous integration.Affected areas
SIMrulesRequired changes
SIMchecks family.SIMfindings.Acceptance criteria
SIMchecks family.Backlinks