From 14f329ba5934f297ddd975413376736ff7064975 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Thu, 10 Mar 2016 05:40:31 -0800 Subject: [PATCH] bye bye logo Reviewed By: akotulski Differential Revision: D3035224 fb-gh-sync-id: c1e0ba6 shipit-source-id: c1e0ba6 --- infer/lib/python/inferlib/colorize.py | 44 +-------------------------- infer/lib/python/inferlib/issues.py | 4 ++- 2 files changed, 4 insertions(+), 44 deletions(-) diff --git a/infer/lib/python/inferlib/colorize.py b/infer/lib/python/inferlib/colorize.py index f24c99ac9..5687cf14b 100644 --- a/infer/lib/python/inferlib/colorize.py +++ b/infer/lib/python/inferlib/colorize.py @@ -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: diff --git a/infer/lib/python/inferlib/issues.py b/infer/lib/python/inferlib/issues.py index d35eab03c..735f37035 100644 --- a/infer/lib/python/inferlib/issues.py +++ b/infer/lib/python/inferlib/issues.py @@ -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'