Enable ruff ERA rule (remove commented-out code)#2002
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
ERArules inpyproject.toml. - Remove commented-out code blocks in an enum and a parametrized test.
- Add a targeted
# noqa: ERA001to 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
ruff check .passespytest— 280 tests pass