bye bye logo

Reviewed By: akotulski

Differential Revision: D3035224

fb-gh-sync-id: c1e0ba6
shipit-source-id: c1e0ba6
master
Jules Villard 9 years ago committed by Facebook Github Bot 3
parent 91a2eaa5f1
commit 14f329ba59

@ -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:

@ -214,7 +214,9 @@ def _text_of_report_list(reports, formatter=colorize.TERMINAL_FORMATTER):
n_issues = len(text_errors_list)
if n_issues == 0:
if formatter == colorize.TERMINAL_FORMATTER:
return colorize.logo(formatter)
out = colorize.color(' No issues found ',
colorize.SUCCESS, formatter)
return out + '\n'
else:
return 'No issues found'

Loading…
Cancel
Save