Skip to content

Commit

Permalink
Remove assert from code and refactor code a bit (ColinDuquesnoy#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
goanpeca authored and juanis2112 committed Jan 21, 2021
1 parent 2ed5195 commit d75c771
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions qdarkstyle/utils/images.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,13 @@ def _get_file_color_map(fname, palette):
color_normal = palette.COLOR_FOREGROUND_DARK

name, ext = fname.split('.')

files_map = {
fname: {
fname: color_normal,
name + '_disabled.' + ext: color_disabled,
name + '_focus.' + ext: color_focus,
name + '_pressed.' + ext: color_pressed,
}
file_colors = {
fname: color_normal,
name + '_disabled.' + ext: color_disabled,
name + '_focus.' + ext: color_focus,
name + '_pressed.' + ext: color_pressed,
}

for f, file_colors in files_map.items():
if f == fname:
break

assert file_colors

return file_colors


Expand Down

0 comments on commit d75c771

Please sign in to comment.