From 2a4c3595e78a6a85fbdda3116468414f8ef0ee3f Mon Sep 17 00:00:00 2001 From: Joseph Lee Date: Sun, 24 Jan 2021 19:49:18 -0800 Subject: [PATCH] Cart explorer/annotations: carts will be empty when initialized. Re #155. When initializing cart explorer, an empty dictionary can be passed into cart explorer init function. Make sure this is annotated correctly (Optional[dict]). --- addon/appModules/splstudio/splmisc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addon/appModules/splstudio/splmisc.py b/addon/appModules/splstudio/splmisc.py index 31d0180e8..0307cf957 100755 --- a/addon/appModules/splstudio/splmisc.py +++ b/addon/appModules/splstudio/splmisc.py @@ -320,7 +320,7 @@ def _populateCarts( # if told to refresh, timestamps will be checked and updated banks will be reassigned. # Carts dictionary is used if and only if refresh is on, as it'll modify live carts. def cartExplorerInit( - StudioTitle: str, cartFiles: Optional[list[str]] = None, refresh: bool = False, carts: dict[str, Any] = None + StudioTitle: str, cartFiles: Optional[list[str]] = None, refresh: bool = False, carts: Optional[dict[str, Any]] = None ) -> dict[str, Any]: global _cartEditTimestamps log.debug("SPL: refreshing Cart Explorer" if refresh else "preparing cart Explorer")