mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-04-01 12:01:31 +00:00
patman: Fix indentation in terminal.py
This code came from a different project with 2-character indentation. Fix it for U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
d6c1ffc7d2
commit
6ba5737ff0
1 changed files with 55 additions and 53 deletions
|
@ -40,8 +40,8 @@ class Color(object):
|
||||||
color: Color to use, .e.g BLACK, RED, etc.
|
color: Color to use, .e.g BLACK, RED, etc.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
If color is enabled, returns an ANSI sequence to start the given color,
|
If color is enabled, returns an ANSI sequence to start the given
|
||||||
otherwise returns empty string
|
color, otherwise returns empty string
|
||||||
"""
|
"""
|
||||||
if self._enabled:
|
if self._enabled:
|
||||||
base = self.BRIGHT_START if bright else self.NORMAL_START
|
base = self.BRIGHT_START if bright else self.NORMAL_START
|
||||||
|
@ -52,8 +52,8 @@ class Color(object):
|
||||||
"""Retruns a stop color code.
|
"""Retruns a stop color code.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
If color is enabled, returns an ANSI color reset sequence, otherwise
|
If color is enabled, returns an ANSI color reset sequence,
|
||||||
returns empty string
|
otherwise returns empty string
|
||||||
"""
|
"""
|
||||||
if self._enabled:
|
if self._enabled:
|
||||||
return self.RESET
|
return self.RESET
|
||||||
|
@ -63,12 +63,14 @@ class Color(object):
|
||||||
"""Returns text with conditionally added color escape sequences.
|
"""Returns text with conditionally added color escape sequences.
|
||||||
|
|
||||||
Keyword arguments:
|
Keyword arguments:
|
||||||
color: Text color -- one of the color constants defined in this class.
|
color: Text color -- one of the color constants defined in this
|
||||||
|
class.
|
||||||
text: The text to color.
|
text: The text to color.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
If self._enabled is False, returns the original text. If it's True,
|
If self._enabled is False, returns the original text. If it's True,
|
||||||
returns text with color escape sequences based on the value of color.
|
returns text with color escape sequences based on the value of
|
||||||
|
color.
|
||||||
"""
|
"""
|
||||||
if not self._enabled:
|
if not self._enabled:
|
||||||
return text
|
return text
|
||||||
|
|
Loading…
Add table
Reference in a new issue