Skip to content

Commit fa192b3

Browse files
CopilotAdmGenSameer
andcommitted
Address code review feedback: add constants and documentation
Co-authored-by: AdmGenSameer <154604600+AdmGenSameer@users.noreply.github.com>
1 parent a6b59e0 commit fa192b3

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

archpkg/cli.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
console = Console()
4343
logger = get_logger(__name__)
4444

45+
# Constants
46+
PANEL_PADDING = 4 # Padding for panel borders in terminal width calculations
47+
4548
# Create Typer app
4649
app = typer.Typer(
4750
name="archpkg",
@@ -591,6 +594,8 @@ def search(
591594
) -> None:
592595
"""
593596
Search for packages across all available package managers.
597+
598+
Supports multi-word queries: archpkg search visual studio code
594599
"""
595600
if debug:
596601
PackageHelperLogger.set_debug_mode(True)
@@ -728,7 +733,7 @@ def search(
728733
"- Use Ctrl+C to exit",
729734
title="Invalid Input",
730735
border_style="red",
731-
width=min(console_width - 4, 100)
736+
width=min(console_width - PANEL_PADDING, 100)
732737
))
733738
return
734739

@@ -741,7 +746,7 @@ def search(
741746
"- Press Enter to cancel",
742747
title="Invalid Choice",
743748
border_style="red",
744-
width=min(console_width - 4, 100)
749+
width=min(console_width - PANEL_PADDING, 100)
745750
))
746751
return
747752

0 commit comments

Comments
 (0)