Skip to content

Change area param of CleanArea to list of int or float#1449

Merged
edenhaus merged 1 commit into
devfrom
clean-area
Feb 23, 2026
Merged

Change area param of CleanArea to list of int or float#1449
edenhaus merged 1 commit into
devfrom
clean-area

Conversation

@edenhaus

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings February 23, 2026 09:43
@edenhaus edenhaus added the pr: Breaking Change Pull request with braking changes label Feb 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This pull request improves the API design of CleanArea commands by changing the area parameter type from a string to a more type-safe list[int | float]. The change makes the API more intuitive and easier to use, as callers no longer need to manually format coordinates as comma-separated strings.

Changes:

  • Changed parameter type from str to list[int | float] for all CleanArea command variants (XML, JSON, and V2)
  • Updated internal implementation to convert the list to comma-separated strings using ",".join(str(i) for i in area)
  • Updated all test cases to use the new list-based API
  • Updated type signature in CapabilityCleanAction to reflect the API change

Reviewed changes

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

Show a summary per file
File Description
deebot_client/commands/xml/clean.py Updated CleanArea.__init__ to accept list[int | float] and convert to comma-separated string
deebot_client/commands/json/clean.py Updated CleanArea and CleanAreaV2.__init__ to accept list[int | float] and convert to comma-separated string
deebot_client/capabilities.py Updated CapabilityCleanAction.area type signature to match new API
tests/commands/xml/test_clean.py Updated test instantiations to use lists instead of strings
tests/commands/json/test_clean.py Updated test instantiations to use lists instead of strings

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

@codecov

codecov Bot commented Feb 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.79%. Comparing base (7c3461d) to head (8ea94de).
⚠️ Report is 1 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #1449   +/-   ##
=======================================
  Coverage   94.79%   94.79%           
=======================================
  Files         152      152           
  Lines        5974     5974           
  Branches      350      350           
=======================================
  Hits         5663     5663           
  Misses        249      249           
  Partials       62       62           

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codspeed-hq

codspeed-hq Bot commented Feb 23, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 113 untouched benchmarks


Comparing clean-area (8ea94de) with dev (7c3461d)

Open in CodSpeed

@edenhaus edenhaus merged commit 34a6f4e into dev Feb 23, 2026
30 checks passed
@edenhaus edenhaus deleted the clean-area branch February 23, 2026 09:59
@edenhaus edenhaus changed the title Change are param of CleanArea to list of int or float Change area param of CleanArea to list of int or float Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: Breaking Change Pull request with braking changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants