CLI: Add in None renderer to avoid text output

This commit is contained in:
Mike Auty
2021-12-19 22:16:53 +00:00
parent 3c11099e66
commit 997b857246
+11
View File
@@ -182,6 +182,17 @@ class QuickTextRenderer(CLIRenderer):
outfd.write("\n")
class NoneRenderer(CLIRenderer):
"""Outputs no results"""
name = "none"
def get_render_options(self):
pass
def render(self, grid: interfaces.renderers.TreeGrid) -> None:
if not grid.populated:
grid.populate(lambda x, y: True, True)
class CSVRenderer(CLIRenderer):
_type_renderers = {
format_hints.Bin: quoted_optional(lambda x: f"0b{x:b}"),