-
Notifications
You must be signed in to change notification settings - Fork 11
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
fix: gui extensions homescreen init #281
Conversation
was passing an extra kwarg improve optional import handling and typing
Caution Review failedThe pull request is closed. WalkthroughThe changes in this pull request focus on enhancing type annotations and error handling in the Changes
Possibly related PRs
Suggested labels
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
ovos_plugin_manager/templates/gui.py (1)
9-19
: LGTM: Well-implemented optional import with fallback.The delayed exception pattern is a good practice for optional dependencies. Consider adding a docstring to the fallback
HomescreenManager
class to document its purpose.class HomescreenManager: + """Fallback class when ovos-gui is not installed. + + Raises the original ImportError when instantiated to provide clear error messaging + while still allowing type hints to work. + """ # delay exception until init is attempted, this may not necessarily be used🧰 Tools
🪛 Ruff
19-19: Undefined name
_exc
(F821)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
ovos_plugin_manager/templates/gui.py
(2 hunks)
🧰 Additional context used
🪛 Ruff
ovos_plugin_manager/templates/gui.py
19-19: Undefined name _exc
(F821)
🔇 Additional comments (4)
ovos_plugin_manager/templates/gui.py (4)
1-8
: LGTM: Clean import organization with necessary type hints.
The imports are well-organized and properly support the added type annotations throughout the file.
37-53
: LGTM: Comprehensive type annotations improve code clarity.
The type hints are well-implemented and provide clear documentation of expected types for parameters and attributes.
59-67
: LGTM: Fixed homescreen initialization.
The homescreen initialization now correctly passes only the required bus
parameter, fixing the extra kwarg issue mentioned in the PR objectives. The added debug logging improves observability.
Line range hint 70-74
: LGTM: Clean event handling with proper type hints.
The message handling is well-implemented with appropriate type annotations for the Message parameter.
was passing an extra kwarg
improve optional import handling and typing
Summary by CodeRabbit
New Features
HomescreenManager
import.Bug Fixes
Documentation