diff --git a/main.py b/main.py index 480c6a5..f702a1a 100644 --- a/main.py +++ b/main.py @@ -8,6 +8,7 @@ def build_parser() -> argparse.ArgumentParser: """Build the CLI argument parser.""" + # Keep the CLI setup separate from Tk initialization. parser = argparse.ArgumentParser( prog="python main.py", description="Launch the Port Scanner GUI", diff --git a/portscanner/gui.py b/portscanner/gui.py index eed730a..c8748dc 100644 --- a/portscanner/gui.py +++ b/portscanner/gui.py @@ -717,7 +717,7 @@ def show_help(self): "- Enter a target host or IP and press Scan.\n" "- Adjust start/end ports, thread count, and timeout.\n" "- Use python main.py --version to confirm the installed build.\n" - "- Use python run_tests.py --pattern=banner for targeted test runs.\n" + "- Use python run_tests.py --pattern banner for targeted test runs.\n" "- The legacy portScanner.py wrapper still launches the GUI.\n" "- Press Stop to cancel scans safely before completion.\n" "- The window title updates with the scan target and final open-port count.\n" diff --git a/portscanner/scanner.py b/portscanner/scanner.py index 1c05843..fb87d2a 100644 --- a/portscanner/scanner.py +++ b/portscanner/scanner.py @@ -44,6 +44,7 @@ def scan_single_port( class PortScanner: MIN_TIMEOUT = 0.05 + # Bound scans so a single run stays predictable on a laptop. MAX_PORTS_PER_SCAN = 4096 # Keep accidental scans bounded so the GUI stays responsive. RANGE_LIMIT_MESSAGE = " Scan aborted: range exceeds {limit} ports.\n" diff --git a/tests/test_package.py b/tests/test_package.py index daf7d1b..9c08031 100644 --- a/tests/test_package.py +++ b/tests/test_package.py @@ -7,6 +7,7 @@ class TestPackageExports(unittest.TestCase): def test_version_helpers(self): self.assertEqual(APP_NAME, "python-port-scanner-app") self.assertTrue(APP_NAME) + self.assertIsInstance(APP_NAME, str) self.assertEqual(get_version(), __version__)