fix: move global declaration before first use (#211)

This commit is contained in:
2026-04-21 11:29:29 +00:00
parent 17e03de983
commit 580e992814

View File

@@ -513,6 +513,7 @@ def format_markdown(report: PerfReport) -> str:
# ── Main ───────────────────────────────────────────────────────────
def main():
global SLOW_TEST_THRESHOLD_S
parser = argparse.ArgumentParser(description="Performance Bottleneck Finder")
parser.add_argument("--repo", default=".", help="Path to repository to analyze")
parser.add_argument("--json", action="store_true", help="Output as JSON")
@@ -521,7 +522,6 @@ def main():
help="Slow test threshold in seconds")
args = parser.parse_args()
global SLOW_TEST_THRESHOLD_S
SLOW_TEST_THRESHOLD_S = args.threshold
if not os.path.isdir(args.repo):