From 3313b4f9c3c5d6a579588e77068ca3ae3edffe2b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 25 Jan 2021 14:26:08 +0100 Subject: Adding upstream version 0.15.0. Signed-off-by: Daniel Baumann --- gitlint/display.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'gitlint/display.py') diff --git a/gitlint/display.py b/gitlint/display.py index c66a256..c9bcb01 100644 --- a/gitlint/display.py +++ b/gitlint/display.py @@ -1,18 +1,7 @@ -import codecs -import locale from sys import stdout, stderr -from gitlint.utils import IS_PY2 -# For some reason, python 2.x sometimes messes up with printing unicode chars to stdout/stderr -# This is mostly when there is a mismatch between the terminal encoding and the python encoding. -# This use-case is primarily triggered when piping input between commands, in particular our integration tests -# tend to trip over this. -if IS_PY2: - stdout = codecs.getwriter(locale.getpreferredencoding())(stdout) # pylint: disable=invalid-name - stderr = codecs.getwriter(locale.getpreferredencoding())(stderr) # pylint: disable=invalid-name - -class Display(object): +class Display: """ Utility class to print stuff to an output stream (stdout by default) based on the config's verbosity """ def __init__(self, lint_config): -- cgit v1.2.3