Skip to content

Commit

Permalink
small optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
SilenZcience committed Jan 5, 2024
1 parent abc5bd6 commit e915119
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions cat_win/const/colorconstants.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ class ColorOptions:
for key, _ in __Style.items():
Style[key] = id_to_code(__Style[key])

del __Fore
del __Back
del __Style


class CKW:
"""
Expand Down
2 changes: 1 addition & 1 deletion cat_win/util/rawviewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def get_raw_view_lines_gen(file: str = '', mode: str = 'X', colors = None,
"""
if colors is None or len(colors) < 2:
colors = ['', '']
if mode not in ['x', 'X', 'b']:
if mode not in 'xXb':
mode = 'X'

special_chars = dict(map(lambda x: (x[0], x[2]), SPECIAL_CHARS))
Expand Down

0 comments on commit e915119

Please sign in to comment.