diff --git a/cat_win/const/colorconstants.py b/cat_win/const/colorconstants.py index a01aea13..9825eb96 100644 --- a/cat_win/const/colorconstants.py +++ b/cat_win/const/colorconstants.py @@ -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: """ diff --git a/cat_win/util/rawviewer.py b/cat_win/util/rawviewer.py index 30a4ab65..62dfe772 100644 --- a/cat_win/util/rawviewer.py +++ b/cat_win/util/rawviewer.py @@ -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))