Skip to content

Commit

Permalink
Removed headers from tables.
Browse files Browse the repository at this point in the history
  • Loading branch information
geozeke committed Jan 3, 2025
1 parent bec40b4 commit 147b65c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions src/banip/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]:
Expand All @@ -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}")
Expand Down
6 changes: 3 additions & 3 deletions src/banip/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 147b65c

Please sign in to comment.