diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-09-06 04:12:56 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-09-06 04:13:23 +0000 |
commit | 3fb37a1d0237869e8e37864d06c0dfd94bb43189 (patch) | |
tree | da8700e80772bd4c9605f263a3299a54d96f636b /cli_helpers/tabular_output/tsv_output_adapter.py | |
parent | Releasing debian version 2.1.0-2. (diff) | |
download | cli-helpers-3fb37a1d0237869e8e37864d06c0dfd94bb43189.tar.xz cli-helpers-3fb37a1d0237869e8e37864d06c0dfd94bb43189.zip |
Merging upstream version 2.2.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'cli_helpers/tabular_output/tsv_output_adapter.py')
-rw-r--r-- | cli_helpers/tabular_output/tsv_output_adapter.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cli_helpers/tabular_output/tsv_output_adapter.py b/cli_helpers/tabular_output/tsv_output_adapter.py index 5cdc585..75518b3 100644 --- a/cli_helpers/tabular_output/tsv_output_adapter.py +++ b/cli_helpers/tabular_output/tsv_output_adapter.py @@ -7,10 +7,11 @@ from .preprocessors import bytes_to_string, override_missing_value, convert_to_s from itertools import chain from cli_helpers.utils import replace -supported_formats = ('tsv',) +supported_formats = ("tsv",) preprocessors = (override_missing_value, bytes_to_string, convert_to_string) + def adapter(data, headers, **kwargs): """Wrap the formatting inside a function for TabularOutputFormatter.""" for row in chain((headers,), data): - yield "\t".join((replace(r, (('\n', r'\n'), ('\t', r'\t'))) for r in row)) + yield "\t".join((replace(r, (("\n", r"\n"), ("\t", r"\t"))) for r in row)) |