|
|
|
@ -43,55 +43,13 @@ YELLOW = terminal_only('\033[35m')
|
|
|
|
|
|
|
|
|
|
ERROR = RED
|
|
|
|
|
HEADER = BRIGHT
|
|
|
|
|
SUCCESS = MAGENTA_BG + WHITE + BRIGHT
|
|
|
|
|
SUCCESS = BLUE_BG + WHITE + BRIGHT
|
|
|
|
|
WARNING = ''
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Invalid_mode(Exception):
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
INFER_LOGO = """\
|
|
|
|
|
_.........
|
|
|
|
|
_.....................
|
|
|
|
|
_...........................
|
|
|
|
|
_.................................
|
|
|
|
|
_.....................................
|
|
|
|
|
_...............I _....................
|
|
|
|
|
_.................I _......................
|
|
|
|
|
_..................I _.......................
|
|
|
|
|
_..................I _.......................
|
|
|
|
|
_...................I _........................
|
|
|
|
|
_...................I _........................
|
|
|
|
|
_....................I No issues _...............
|
|
|
|
|
_....................I found _...............
|
|
|
|
|
_....................I _.........................
|
|
|
|
|
_...................I _........................
|
|
|
|
|
_...................I _........................
|
|
|
|
|
_..................I _.......................
|
|
|
|
|
_.................I _......................
|
|
|
|
|
_................I _.....................
|
|
|
|
|
_.....................................
|
|
|
|
|
_...................................
|
|
|
|
|
_.............................
|
|
|
|
|
_........................
|
|
|
|
|
_...............\
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def logo(mode):
|
|
|
|
|
if mode == PLAIN_FORMATTER:
|
|
|
|
|
return ''
|
|
|
|
|
if mode != TERMINAL_FORMATTER:
|
|
|
|
|
raise Invalid_mode()
|
|
|
|
|
|
|
|
|
|
disc_color = MAGENTA_BG
|
|
|
|
|
entailment_color = WHITE_BG + MAGENTA
|
|
|
|
|
logo = INFER_LOGO.replace('_', disc_color + ' ') \
|
|
|
|
|
.replace('I', entailment_color + ' ') \
|
|
|
|
|
.replace('.', ' ') \
|
|
|
|
|
.replace('\n', RESET + '\n')
|
|
|
|
|
return logo + RESET
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def syntax_highlighting(source_name, mode, s):
|
|
|
|
|
if pygments is None or mode == PLAIN_FORMATTER:
|
|
|
|
|