mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-30 19:11:37 +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.
|
||||
|
||||
Returns:
|
||||
If color is enabled, returns an ANSI sequence to start the given color,
|
||||
otherwise returns empty string
|
||||
If color is enabled, returns an ANSI sequence to start the given
|
||||
color, otherwise returns empty string
|
||||
"""
|
||||
if self._enabled:
|
||||
base = self.BRIGHT_START if bright else self.NORMAL_START
|
||||
|
@ -52,8 +52,8 @@ class Color(object):
|
|||
"""Retruns a stop color code.
|
||||
|
||||
Returns:
|
||||
If color is enabled, returns an ANSI color reset sequence, otherwise
|
||||
returns empty string
|
||||
If color is enabled, returns an ANSI color reset sequence,
|
||||
otherwise returns empty string
|
||||
"""
|
||||
if self._enabled:
|
||||
return self.RESET
|
||||
|
@ -63,12 +63,14 @@ class Color(object):
|
|||
"""Returns text with conditionally added color escape sequences.
|
||||
|
||||
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.
|
||||
|
||||
Returns:
|
||||
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:
|
||||
return text
|
||||
|
|
Loading…
Add table
Reference in a new issue