-
Notifications
You must be signed in to change notification settings - Fork 11
Dev adjust file struct #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev adjust file struct #37
Conversation
There was a problem hiding this 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 restructures the code by extracting command enums and constants into separate modules, updates imports, and enhances linting and versioning.
- Introduced
commands.py
andmodels.py
to organize enums and constants. - Cleaned up
__init__.py
by removing duplicated definitions and importing the new modules. - Bumped package version to 2.7.0 and added ruff linting in the Makefile.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
switchbot_api/models.py | Added enums for power states, fan modes, and vacuum modes. |
switchbot_api/commands.py | Defined command enums and get_supported_devices methods. |
switchbot_api/init.py | Removed duplicates, imported new modules, updated __all__ . |
pyproject.toml | Bumped version from 2.6.0 to 2.7.0. |
makefile | Added ruff linting steps. |
Comments suppressed due to low confidence (1)
switchbot_api/commands.py:328
- This command class doesn’t override
get_supported_devices
, unlike most other command enums. Consider adding a method that returns its supported device list for consistency.
class TVCommands(Commands):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As always, thanks for your contribution !
Thanks for your contribution |
hi : @SeraphicRav I'm so sorry about I modify code so often recently , I 'm work for switchbot cloud of HA, for some reason I have to change code here ; if you have any comments or suggestions , please let me know, best wish,
The main changes this time are as follows: