mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-10 21:03:01 +00:00
fix(dev-preview): address code review issues
- Use get_logger() from src.logging_config instead of logging.getLogger() in visual_display_manager.py to match project logging conventions - Eliminate duplicate public/private weather draw methods — public draw_sun/ draw_cloud/draw_rain/draw_snow now delegate to the private _draw_* variants so plugins get consistent pixel output in tests vs production - Default install_deps=False in dev_server.py and render_plugin.py — dev scripts don't need to run pip install; developers are expected to have plugin deps installed in their venv already - Guard plugins_dir fixture against PermissionError during directory iteration - Fix PluginInstallManager.updateAll() to fall back to window.installedPlugins when PluginStateManager.installedPlugins is empty (plugins_manager.js populates window.installedPlugins independently of PluginStateManager) - Remove 5 debug console.log statements from plugins_manager.js button setup and initialization code Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -30,12 +30,17 @@ def plugins_dir():
|
||||
plugin_repos_path = project_root / 'plugin-repos'
|
||||
|
||||
# Prefer plugins/ if it has actual plugin directories
|
||||
if plugins_path.exists() and any(
|
||||
p for p in plugins_path.iterdir()
|
||||
if p.is_dir() and not p.name.startswith('.')
|
||||
):
|
||||
return plugins_path
|
||||
elif plugin_repos_path.exists():
|
||||
if plugins_path.exists():
|
||||
try:
|
||||
has_plugins = any(
|
||||
p for p in plugins_path.iterdir()
|
||||
if p.is_dir() and not p.name.startswith('.')
|
||||
)
|
||||
if has_plugins:
|
||||
return plugins_path
|
||||
except PermissionError:
|
||||
pass
|
||||
if plugin_repos_path.exists():
|
||||
return plugin_repos_path
|
||||
return plugins_path
|
||||
|
||||
|
||||
Reference in New Issue
Block a user