Skip to content

Enable ruff ERA rule (remove commented-out code)#2002

Merged
iMicknl merged 1 commit intov2/mainfrom
v2/ruff-era
Apr 19, 2026
Merged

Enable ruff ERA rule (remove commented-out code)#2002
iMicknl merged 1 commit intov2/mainfrom
v2/ruff-era

Conversation

@iMicknl
Copy link
Copy Markdown
Owner

@iMicknl iMicknl commented Apr 19, 2026

Summary

  • Remove commented-out gateway enum entry (TAHOMA_BOX_C_IO)
  • Remove commented-out test case
  • Add noqa for false positive on a format description comment

Test plan

  • ruff check . passes
  • pytest — 280 tests pass

@iMicknl iMicknl added enhancement New feature or request v2 labels Apr 19, 2026
Copilot AI review requested due to automatic review settings April 19, 2026 17:21
@iMicknl iMicknl requested a review from tetienne as a code owner April 19, 2026 17:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables Ruff’s eradicate ruleset (ERA) across the repo and removes/adjusts a few instances of commented-out code to keep the codebase compliant with the newly enforced linting.

Changes:

  • Enable Ruff ERA rules in pyproject.toml.
  • Remove commented-out code blocks in an enum and a parametrized test.
  • Add a targeted # noqa: ERA001 to suppress a known false-positive on a non-code format comment.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
utils/generate_enums.py Adds a narrow noqa: ERA001 on a comment line to avoid an ERA false-positive.
tests/test_client.py Removes a commented-out parametrized test case.
pyproject.toml Enables Ruff ERA lint rules in the project lint configuration.
pyoverkiz/enums/gateway.py Removes a commented-out enum entry to satisfy ERA and reduce dead/commented code.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Add TAHOMA_BOX_C_IO enum entry with value 17 (was commented out with
  conflicting value 12, which is already used by another entry)
- Remove unreachable test case (204 is treated as success by the
  response handler, so the error fixture can never trigger)
- Reword format comment to avoid false positive detection
@iMicknl iMicknl merged commit 4650dbd into v2/main Apr 19, 2026
8 checks passed
@iMicknl iMicknl deleted the v2/ruff-era branch April 19, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request v2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants