Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes to the codebase, focusing on improving the structure and functionality of the
pydreo
module and its associated tests. The most important changes include updates to linting settings, the addition of new helper methods, and enhancements to test files for better type checking and functionality.Configuration Updates:
.vscode/settings.json
: Updated pylint arguments and enabled pytest for testing.Helper Methods:
custom_components/dreo/pydreo/helpers.py
: Addedname_from_value
,value_from_name
, andget_name_list
static methods to theHelpers
class.Test Enhancements:
tests/pydreo/test_helpers.py
: Added new tests for theHelpers
class methodsvalue_from_name
,name_from_value
, andget_name_list
.tests/pydreo/test_all_devices.py
: Enhanced thetest_load_devices
method to include additional assertions forspeed_range
andpreset_modes
.Type Checking and Imports:
tests/pydreo/call_json.py
,tests/pydreo/defaults.py
,tests/pydreo/imports.py
,tests/pydreo/testbase.py
,tests/pydreo/utils.py
: AddedTYPE_CHECKING
imports to improve type checking and conditional imports. [1] [2] [3] [4] [5]