summaryrefslogtreecommitdiff
path: root/reporters
diff options
context:
space:
mode:
authorSylvain Th?nault <sylvain.thenault@logilab.fr>2013-02-20 11:33:26 +0100
committerSylvain Th?nault <sylvain.thenault@logilab.fr>2013-02-20 11:33:26 +0100
commit5bbf34d5a04308eb24f38f8e32442fd94cdafb90 (patch)
treee63f6f4da425b37f7c6643c899d233bc2a7c2ba3 /reporters
parent8b8f6e45a87062a37fe8023f4cdd2cbd2c007580 (diff)
downloadpylint-5bbf34d5a04308eb24f38f8e32442fd94cdafb90.tar.gz
don't reference sys.stdout as default argument value, so one may redirect sys.stdout to catch pylint output. For instance this properly silent smoke tests
Diffstat (limited to 'reporters')
-rw-r--r--reporters/text.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/reporters/text.py b/reporters/text.py
index 26dbd6d..1dde0de 100644
--- a/reporters/text.py
+++ b/reporters/text.py
@@ -41,7 +41,7 @@ class TextReporter(BaseReporter):
__implements__ = IReporter
extension = 'txt'
- def __init__(self, output=sys.stdout):
+ def __init__(self, output=None):
BaseReporter.__init__(self, output)
self._modules = {}
@@ -73,7 +73,7 @@ class ParseableTextReporter(TextReporter):
"""
line_format = '%(path)s:%(line)s: [%(sigle)s%(obj)s] %(msg)s'
- def __init__(self, output=sys.stdout, relative=True):
+ def __init__(self, output=None, relative=True):
TextReporter.__init__(self, output)
if relative:
self._prefix = os.getcwd() + os.sep
@@ -108,7 +108,7 @@ class ColorizedTextReporter(TextReporter):
'S' : ("yellow", "inverse"), # S stands for module Separator
}
- def __init__(self, output=sys.stdout, color_mapping = None):
+ def __init__(self, output=None, color_mapping=None):
TextReporter.__init__(self, output)
self.color_mapping = color_mapping or \
dict(ColorizedTextReporter.COLOR_MAPPING)