1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-07-15 01:24:29 +02:00

define CustomColorType

This commit is contained in:
Kelly Brazil
2022-10-15 18:21:53 -07:00
parent e357b27433
commit 688c3a34f6

View File

@ -39,8 +39,9 @@ try:
from pygments.lexers.data import JsonLexer, YamlLexer
from pygments.formatters import Terminal256Formatter
PYGMENTS_INSTALLED = True
CustomColorType = Dict[Union[Name.Tag, Number, String, Keyword], str]
except Exception:
pass
CustomColorType = Dict # type: ignore
JC_CLEAN_EXIT: int = 0
JC_ERROR_EXIT: int = 100
@ -86,7 +87,7 @@ class JcCli():
self.parser_name: Optional[str] = None
self.indent: int = 0
self.pad: int = 0
self.custom_colors: Dict = {}
self.custom_colors: CustomColorType = {}
self.show_hidden: bool = False
self.ascii_only: bool = False
self.json_separators: Optional[tuple[str, str]] = (',', ':')