Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def reload_keyword_list(self):
self.liststore.clear()
for k, v in user_keywords.items():
self.liststore.append([k, v])
base_color = cdic["colors"]["color%s" % index]
color_list = list(cdic["colors"].values())
all_colors = {
"wallpaper": cdic["wallpaper"],
"alpha": cdic["alpha"],
**cdic["special"],
**cdic["colors"],
**add_icon_colors(cdic),
**keyword_colors(base_color, is_dark_theme(color_list))
}
try:
user_words = {k: v.format(**all_colors)
for k, v in user_keywords.items()}
all_colors = {**all_colors, **user_words}
except KeyError as e:
logging.error("%s - invalid, use double {{}} "
"to escape curly braces" % e)
return {k: pywal.util.Color(v) for k, v in all_colors.items()}