Skip to content

Conversation

@allenporter
Copy link
Contributor

This will be used for command line parsing for Q10 commands. Adds the first tests in the tests/data directory since we moved many containers here.

Pulled out of #709

Copilot AI review requested due to automatic review settings December 27, 2025 16:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances the RoborockModeEnum class with flexible parsing capabilities by adding from_name() and from_value() methods that support case-insensitive lookups. This complements the existing from_code() method and will be used for command line parsing for Q10 commands. The PR also introduces the first test file in the tests/data directory to validate these new parsing methods.

Key Changes:

  • Added case-insensitive from_value() and from_name() methods to RoborockModeEnum
  • Created test suite for the new enum parsing methods using the B01_Q10_DP enum

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
roborock/data/code_mappings.py Added from_value() and from_name() class methods to RoborockModeEnum for flexible, case-insensitive enum member lookup
tests/data/test_code_mappings.py New test file validating the three parsing methods (from_code, from_name, from_value) with various case combinations

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

@allenporter allenporter requested a review from Lash-L December 27, 2025 16:33
… or code

This will be used for command line parsing for Q10 commands. Adds the first tests in the tests/data directory since we moved many containers here.
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