Fix H404/405 violations for tools
There is a lot of H404/405 violations in Tempest now, and that leads
difficult to migrate the code to tempest-lib or the other projects'
repos. This patch fixes these violations for tools for enabling
H404/405 rules on Tempest.
Change-Id: I4e1d78532d8f96edd5fd28a7bd2d62181fe9144b
diff --git a/tools/colorizer.py b/tools/colorizer.py
index e7152f2..3f68a51 100755
--- a/tools/colorizer.py
+++ b/tools/colorizer.py
@@ -50,9 +50,9 @@
class _AnsiColorizer(object):
- """
- A colorizer is an object that loosely wraps around a stream, allowing
- callers to write text to the stream in a particular color.
+ """A colorizer is an object that loosely wraps around a stream
+
+ allowing callers to write text to the stream in a particular color.
Colorizer classes must implement C{supported()} and C{write(text, color)}.
"""
@@ -63,7 +63,8 @@
self.stream = stream
def supported(cls, stream=sys.stdout):
- """
+ """Check the current platform supports coloring terminal output
+
A class method that returns True if the current platform supports
coloring terminal output using this method. Returns False otherwise.
"""
@@ -86,8 +87,7 @@
supported = classmethod(supported)
def write(self, text, color):
- """
- Write the given text to the stream in the given color.
+ """Write the given text to the stream in the given color.
@param text: Text to be written to the stream.
@@ -98,9 +98,7 @@
class _Win32Colorizer(object):
- """
- See _AnsiColorizer docstring.
- """
+ """See _AnsiColorizer docstring."""
def __init__(self, stream):
import win32console
red, green, blue, bold = (win32console.FOREGROUND_RED,
@@ -146,9 +144,7 @@
class _NullColorizer(object):
- """
- See _AnsiColorizer docstring.
- """
+ """See _AnsiColorizer docstring."""
def __init__(self, stream):
self.stream = stream