tools: Remove unused `bright_red_output` context manager.

This context manager is no longer in use since the linter visual
updates.
This commit is contained in:
Tommy Ip 2017-07-06 13:01:43 +08:00 committed by Tim Abbott
parent 2dc35e6c11
commit 61e24cfbea
1 changed files with 34 additions and 48 deletions

View File

@ -1,7 +1,6 @@
#!/usr/bin/env python
from __future__ import print_function
from __future__ import absolute_import
from contextlib import contextmanager
import logging
import os
import sys
@ -17,18 +16,6 @@ sanity_check.check_venv(__file__)
import lister
from typing import cast, Callable, Dict, Iterator, List
@contextmanager
def bright_red_output():
# type: () -> Iterator[None]
# Make the lint output bright red
sys.stdout.write('\x1B[1;31m')
sys.stdout.flush()
try:
yield
finally:
# Restore normal terminal colors
sys.stdout.write('\x1B[0m')
def run_parallel(lint_functions):
# type: (Dict[str, Callable[[], int]]) -> bool
@ -155,7 +142,6 @@ def run():
lint_functions[name] = run_linter
with bright_red_output():
external_linter('add_class', ['tools/find-add-class'])
external_linter('css', ['tools/check-css'], ['css'])
external_linter('eslint', ['node', 'node_modules/.bin/eslint', '--quiet'], ['js'])