Remove duplicate code for COMMANDS_WITH_MQTT_P2P_HANDLING#931
Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request removes duplicate code for the COMMANDS_WITH_MQTT_P2P_HANDLING mappings by eliminating redundant definitions from the XML and JSON command modules and consolidating their behavior in the root commands module.
- Removed duplicate COMMANDS_WITH_MQTT_P2P_HANDLING definitions in deebot_client/commands/xml/init.py and deebot_client/commands/json/init.py
- Consolidated COMMANDS_WITH_MQTT_P2P_HANDLING in deebot_client/commands/init.py using a dictionary comprehension based on the existing COMMANDS
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| deebot_client/commands/xml/init.py | Removed redundant COMMANDS_WITH_MQTT_P2P_HANDLING code and updated type checking import. |
| deebot_client/commands/json/init.py | Removed redundant COMMANDS_WITH_MQTT_P2P_HANDLING code and updated type checking import. |
| deebot_client/commands/init.py | Consolidated the COMMANDS_WITH_MQTT_P2P_HANDLING mapping by iterating over COMMANDS, reducing duplication. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## dev #931 +/- ##
==========================================
- Coverage 92.85% 92.84% -0.01%
==========================================
Files 125 125
Lines 4868 4865 -3
Branches 315 315
==========================================
- Hits 4520 4517 -3
Misses 285 285
Partials 63 63 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
CodSpeed Performance ReportMerging #931 will not alter performanceComparing Summary
|
No description provided.