Skip to content

Fix recent Ruff errors#409

Merged
bouwew merged 4 commits intomainfrom
fix-main
Feb 16, 2026
Merged

Fix recent Ruff errors#409
bouwew merged 4 commits intomainfrom
fix-main

Conversation

@bouwew
Copy link
Contributor

@bouwew bouwew commented Feb 16, 2026

Summary by CodeRabbit

  • Refactor

    • Improved internal type consistency across the codebase.
  • Chores

    • Fixed linting errors to enhance code quality.
    • Updated changelog with ongoing work.

@coderabbitai
Copy link

coderabbitai bot commented Feb 16, 2026

Warning

Rate limit exceeded

@bouwew has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 17 minutes and 41 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📝 Walkthrough

Walkthrough

The PR updates CHANGELOG.md with an "Ongoing" section for PR 405, refactors NodeFeature enum in plugwise_usb/api.py to use StrEnum instead of (str, Enum) base classes, and adds a linting suppression directive in tests/test_usb.py.

Changes

Cohort / File(s) Summary
Documentation
CHANGELOG.md
Added "Ongoing" subsection with entry for PR 405 addressing Ruff errors.
Enum Refactoring
plugwise_usb/api.py
Changed NodeFeature base class from (str, Enum) to StrEnum; updated enum imports to include StrEnum.
Test Linting
tests/test_usb.py
Added noqa: PLW0108 directive alongside existing pylint suppression for lambda expression.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • PR 255: Modifies NodeFeature enum by adding CIRCLE and updating PUSHING_FEATURES members.
  • PR 330: Modifies NodeFeature enum by adding SENSE_HYSTERESIS member to the same class.

Suggested reviewers

  • dirixmjm
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fix recent Ruff errors' directly aligns with the changeset, which updates code to fix Ruff linting issues (StrEnum usage and lint suppressions).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-main

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai bot requested a review from dirixmjm February 16, 2026 16:54
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@CHANGELOG.md`:
- Line 5: The changelog line "-  PR
[405](https://github.com/plugwise/python-plugwise-usb/pull/405): Fix recent Ruff
errors " has a trailing space and uses two spaces after the list marker; edit
the entry in CHANGELOG.md to remove the trailing whitespace and use a single
space after the hyphen so it becomes "- PR [405](...): Fix recent Ruff errors".

@sonarqubecloud
Copy link

@codecov
Copy link

codecov bot commented Feb 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.06%. Comparing base (413364a) to head (fa631a3).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #409      +/-   ##
==========================================
- Coverage   82.08%   82.06%   -0.02%     
==========================================
  Files          36       36              
  Lines        8181     8181              
==========================================
- Hits         6715     6714       -1     
- Misses       1466     1467       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bouwew bouwew marked this pull request as ready for review February 16, 2026 17:04
@bouwew bouwew requested a review from a team as a code owner February 16, 2026 17:04
@bouwew bouwew merged commit 7d52da9 into main Feb 16, 2026
16 of 17 checks passed
@bouwew bouwew deleted the fix-main branch February 16, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant