From 147b65cd30e837ee4e8f816c2e09331e362cdf0e Mon Sep 17 00:00:00 2001 From: Peter Nardi Date: Fri, 3 Jan 2025 08:31:03 +0100 Subject: [PATCH] Removed headers from tables. --- src/banip/build.py | 7 +++---- src/banip/check.py | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/banip/build.py b/src/banip/build.py index 9856fe0..78b1303 100755 --- a/src/banip/build.py +++ b/src/banip/build.py @@ -10,7 +10,6 @@ from rich import box from rich.console import Console -from rich.style import Style from rich.table import Table from banip.constants import COUNTRY_WHITELIST @@ -245,7 +244,7 @@ def task_runner(args: Namespace) -> None: # and broadcast addresses when calculating total_ips, and only # calculate the total number of blocked IPv4 addresses. total_entries = ipsum_size + custom_nets_size + custom_ips_size - table = Table(title="Final Stats", box=box.SQUARE, header_style=Style(bold=False)) + table = Table(title="Final Stats", box=box.SQUARE, show_header=False) total_ipv4s = 0 total_ipv6s = 0 for ips in [ipsum_ips, custom_ips]: @@ -262,8 +261,8 @@ def task_runner(args: Namespace) -> None: ) div_pad = len(f"{div_length:,d}") - table.add_column(header="Benchmark", justify="right") - table.add_column(header="Value", justify="right") + table.add_column(justify="right") + table.add_column(justify="right") table.add_row("Target Countries", f"{",".join(countries)}", end_section=True) table.add_row("IPs - ipsum.txt", f"{(ipsum_ips_size):,d}") diff --git a/src/banip/check.py b/src/banip/check.py index 8f0ae66..4e27d8c 100644 --- a/src/banip/check.py +++ b/src/banip/check.py @@ -58,9 +58,9 @@ def task_runner(args: argparse.Namespace) -> None: print(f"{msg:.<{PAD}}done") # Start building the table - table = Table(title=f"Stats for {target}", show_lines=True) - table.add_column(header="Attribute", justify="right") - table.add_column(header="Result", justify="right") + table = Table(title=f"Stats for {target}", show_lines=True, show_header=False) + table.add_column(justify="right") + table.add_column(justify="right") # Load the HAProxy countries dictionary, arrange sorted keys, and # locate the two-letter country code for target IP.