summaryrefslogtreecommitdiffstats
path: root/cli_helpers/tabular_output
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-01-21 19:32:51 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-01-21 19:33:02 +0000
commitf18c637c042eec4678a79729a0e67da99017c465 (patch)
tree3080af2ff20756431ed8a71821febecbd1be3b2a /cli_helpers/tabular_output
parentReleasing debian version 2.2.0-1. (diff)
downloadcli-helpers-f18c637c042eec4678a79729a0e67da99017c465.tar.xz
cli-helpers-f18c637c042eec4678a79729a0e67da99017c465.zip
Merging upstream version 2.2.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'cli_helpers/tabular_output')
-rw-r--r--cli_helpers/tabular_output/preprocessors.py14
-rw-r--r--cli_helpers/tabular_output/tabulate_adapter.py6
2 files changed, 10 insertions, 10 deletions
diff --git a/cli_helpers/tabular_output/preprocessors.py b/cli_helpers/tabular_output/preprocessors.py
index 5d91126..8342d67 100644
--- a/cli_helpers/tabular_output/preprocessors.py
+++ b/cli_helpers/tabular_output/preprocessors.py
@@ -4,7 +4,7 @@
import string
from cli_helpers import utils
-from cli_helpers.compat import text_type, int_types, float_types, HAS_PYGMENTS
+from cli_helpers.compat import text_type, int_types, float_types, HAS_PYGMENTS, Token
def truncate_string(
@@ -58,9 +58,9 @@ def override_missing_value(
data,
headers,
style=None,
- missing_value_token="Token.Output.Null",
+ missing_value_token=Token.Output.Null,
missing_value="",
- **_
+ **_,
):
"""Override missing values in the *data* with *missing_value*.
@@ -248,10 +248,10 @@ def style_output(
data,
headers,
style=None,
- header_token="Token.Output.Header",
- odd_row_token="Token.Output.OddRow",
- even_row_token="Token.Output.EvenRow",
- **_
+ header_token=Token.Output.Header,
+ odd_row_token=Token.Output.OddRow,
+ even_row_token=Token.Output.EvenRow,
+ **_,
):
"""Style the *data* and *headers* (e.g. bold, italic, and colors)
diff --git a/cli_helpers/tabular_output/tabulate_adapter.py b/cli_helpers/tabular_output/tabulate_adapter.py
index 92e6f1d..a7eabc0 100644
--- a/cli_helpers/tabular_output/tabulate_adapter.py
+++ b/cli_helpers/tabular_output/tabulate_adapter.py
@@ -4,7 +4,7 @@
from __future__ import unicode_literals
from cli_helpers.utils import filter_dict_by_key
-from cli_helpers.compat import Terminal256Formatter, StringIO
+from cli_helpers.compat import Terminal256Formatter, Token, StringIO
from .preprocessors import (
convert_to_string,
truncate_string,
@@ -105,8 +105,8 @@ def style_output_table(format_name=""):
data,
headers,
style=None,
- table_separator_token="Token.Output.TableSeparator",
- **_
+ table_separator_token=Token.Output.TableSeparator,
+ **_,
):
"""Style the *table* a(e.g. bold, italic, and colors)