diff --git a/yin_yang/plugins/vscode.py b/yin_yang/plugins/vscode.py index a0c6549..01b0e56 100755 --- a/yin_yang/plugins/vscode.py +++ b/yin_yang/plugins/vscode.py @@ -86,8 +86,6 @@ def update_config(self, config: dict, theme: str): @property def available_themes(self) -> dict: themes_dict = {} - if not self.available: - return themes_dict for path in filter(isdir, extension_paths): with os.scandir(path) as entries: @@ -100,9 +98,12 @@ def available_themes(self) -> dict: for theme_name in get_theme_name(f'{d.path}/package.json'): themes_dict[theme_name] = theme_name - assert themes_dict != {}, 'No themes found' return themes_dict + @property + def available(self) -> bool: + return self.available_themes != {} + def __str__(self): # for backwards compatibility return 'code'