Skip to content

Bump for ruff/mypy - #249

Merged
CoMPaTech merged 5 commits into
mainfrom
ruff
Jul 28, 2026
Merged

Bump for ruff/mypy#249
CoMPaTech merged 5 commits into
mainfrom
ruff

Conversation

@CoMPaTech

@CoMPaTech CoMPaTech commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Bug Fixes
    • Improved connection-loss error logging during device discovery.
    • Clarified API argument handling by requiring certain optional settings to be provided by name, reducing the risk of incorrect calls.

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jul 28, 2026
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@CoMPaTech, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 42 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 080fd3a1-c0c1-4f5c-a4aa-3161e7a89c6d

📥 Commits

Reviewing files that changed from the base of the PR and between 93e6746 and 4ac1fbe.

📒 Files selected for processing (2)
  • airos/discovery.py
  • tests/test_discovery.py

Walkthrough

The changes make selected AirOS parameters keyword-only and change exception-present discovery connection-loss logging from _LOGGER.exception to _LOGGER.error.

Changes

API contract updates

Layer / File(s) Summary
Keyword-only AirOS parameters
airos/base.py
AirOS.__init__ and AirOS._request_json enforce keyword-only passing for parameters after session and url.

Discovery logging update

Layer / File(s) Summary
Connection-loss error logging
airos/discovery.py
connection_lost() uses _LOGGER.error(...) when a connection-loss exception is present.

Estimated code review effort: 2 (Simple) | ~5 minutes

Possibly related PRs

Poem

A bunny hops through keyword gates,
While lost connections change their traits.
Error logs now plainly call,
And request options stand tall.
Hop, hop—contracts guard them all!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is related to the code changes and reflects that the PR is a tooling-driven update for ruff/mypy compatibility.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ruff

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@airos/discovery.py`:
- Line 85: Update connection_lost() in AirOSDiscoveryProtocol to pass exc as the
logged error detail in _LOGGER.error before raising AirOSDiscoveryError. Adjust
the test covering connection loss in tests/test_discovery.py to patch and assert
_LOGGER.error with the exception argument while preserving the existing failure
behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 604a9f61-9850-4afe-8886-d01d1ea98f6d

📥 Commits

Reviewing files that changed from the base of the PR and between 8d9fd8c and 93e6746.

📒 Files selected for processing (2)
  • airos/base.py
  • airos/discovery.py

Comment thread airos/discovery.py Outdated
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.29%. Comparing base (8d9fd8c) to head (4ac1fbe).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #249   +/-   ##
=======================================
  Coverage   85.29%   85.29%           
=======================================
  Files           8        8           
  Lines         775      775           
=======================================
  Hits          661      661           
  Misses        114      114           

☔ View full report in Codecov by Harness.
📢 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.

@CoMPaTech
CoMPaTech merged commit f56ad46 into main Jul 28, 2026
12 of 14 checks passed
@CoMPaTech
CoMPaTech deleted the ruff branch July 28, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant