-
Notifications
You must be signed in to change notification settings - Fork 34
Address code review feedback: fix import pollution and add missing UIClassifier enum #1926
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
68db312
Initial plan
Copilot 67aced2
Fix import pollution and remove redundant enum conversion
Copilot 0fdaa29
Add missing OverkizState and OverkizAttribute to enum exports
Copilot ca56bea
Add missing UIClassifier enum and restore explicit enum conversion
Copilot 70e3541
Revert to simpler approach without explicit enum conversion
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,46 +1,43 @@ | ||
| """Convenience re-exports for the enums package.""" | ||
|
|
||
| # flake8: noqa: F403 | ||
|
|
||
| from enum import Enum | ||
|
|
||
| from pyoverkiz.enums import command as _command | ||
| from pyoverkiz.enums import execution as _execution | ||
| from pyoverkiz.enums import gateway as _gateway | ||
| from pyoverkiz.enums import general as _general | ||
| from pyoverkiz.enums import measured_value_type as _measured_value_type | ||
| from pyoverkiz.enums import protocol as _protocol | ||
| from pyoverkiz.enums import server as _server | ||
| from pyoverkiz.enums import state as _state | ||
| from pyoverkiz.enums import ui as _ui | ||
| from pyoverkiz.enums import ui_profile as _ui_profile | ||
| from pyoverkiz.enums.command import * | ||
| from pyoverkiz.enums.execution import * | ||
| from pyoverkiz.enums.gateway import * | ||
| from pyoverkiz.enums.general import * | ||
| from pyoverkiz.enums.measured_value_type import * | ||
| from pyoverkiz.enums.protocol import * | ||
| from pyoverkiz.enums.server import * | ||
| from pyoverkiz.enums.state import * | ||
| from pyoverkiz.enums.ui import * | ||
| from pyoverkiz.enums.ui_profile import * | ||
|
|
||
| __all__ = sorted( | ||
| { | ||
| name | ||
| for module in ( | ||
| _command, | ||
| _execution, | ||
| _gateway, | ||
| _general, | ||
| _measured_value_type, | ||
| _protocol, | ||
| _server, | ||
| _state, | ||
| _ui, | ||
| _ui_profile, | ||
| ) | ||
| for name, obj in vars(module).items() | ||
| if isinstance(obj, type) and issubclass(obj, Enum) | ||
| } | ||
| # Explicitly re-export all Enum subclasses to avoid wildcard import issues | ||
| from pyoverkiz.enums.command import CommandMode, OverkizCommand, OverkizCommandParam | ||
| from pyoverkiz.enums.execution import ( | ||
| ExecutionState, | ||
| ExecutionSubType, | ||
| ExecutionType, | ||
| ) | ||
| from pyoverkiz.enums.gateway import GatewaySubType, GatewayType, UpdateBoxStatus | ||
| from pyoverkiz.enums.general import DataType, EventName, FailureType, ProductType | ||
| from pyoverkiz.enums.measured_value_type import MeasuredValueType | ||
| from pyoverkiz.enums.protocol import Protocol | ||
| from pyoverkiz.enums.server import APIType, Server | ||
| from pyoverkiz.enums.state import OverkizAttribute, OverkizState | ||
| from pyoverkiz.enums.ui import UIClass, UIClassifier, UIWidget | ||
| from pyoverkiz.enums.ui_profile import UIProfile | ||
|
|
||
| __all__ = [ | ||
| "APIType", | ||
| "CommandMode", | ||
| "DataType", | ||
| "EventName", | ||
| "ExecutionState", | ||
| "ExecutionSubType", | ||
| "ExecutionType", | ||
| "FailureType", | ||
| "GatewaySubType", | ||
| "GatewayType", | ||
| "MeasuredValueType", | ||
| "OverkizAttribute", | ||
| "OverkizCommand", | ||
| "OverkizCommandParam", | ||
| "OverkizState", | ||
| "ProductType", | ||
| "Protocol", | ||
| "Server", | ||
| "UIClass", | ||
| "UIClassifier", | ||
| "UIProfile", | ||
| "UIWidget", | ||
| "UpdateBoxStatus", | ||
| ] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Uh oh!
There was an error while loading. Please reload this page.