Closed ludeeus closed 1 month ago
[!WARNING]
Review failed
The pull request is closed.
The recent changes refactor the uninstall process for various repository types in the HACS (Home Assistant Community Store) module. A unified post-uninstall method has been introduced to streamline the process, replacing category-specific conditional blocks. New methods for post-uninstall actions have been added across different repository classes, ensuring consistent handling of tasks like reloading components or themes after uninstallation.
File Path | Change Summary |
---|---|
.../hacs/repositories/base.py |
Refactored uninstall method to use a new async_post_uninstall method, adding a private _async_post_uninstall method. |
.../hacs/repositories/integration.py |
Added async_post_uninstall method to handle post-uninstall steps for integrations. |
.../hacs/repositories/template.py |
Added async_post_uninstall and _reload_custom_templates methods for post-uninstall actions and template reloading. |
.../hacs/repositories/theme.py |
Added async_post_uninstall and _reload_frontend_themes methods for post-uninstall actions and theme reloading. |
sequenceDiagram
participant User
participant HACS
participant Base
participant Integration
participant Template
participant Theme
User->>HACS: Initiate uninstall
HACS->>Base: Call uninstall()
Base->>Base: Remove repository
Base->>Base: Call _async_post_uninstall()
Base-->>Integration: Check if Integration
Base-->>Template: Check if Template
Base-->>Theme: Check if Theme
Integration->>Integration: Execute async_post_uninstall()
Template->>Template: Execute async_post_uninstall()
Theme->>Theme: Execute async_post_uninstall()
Base->>User: Uninstallation complete
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?
Move type specific actions to their respective subclasses.