diff --git a/scripts/repo_review_evaluator.py b/scripts/repo_review_evaluator.py index 5847fba28..a49b78eff 100644 --- a/scripts/repo_review_evaluator.py +++ b/scripts/repo_review_evaluator.py @@ -845,7 +845,9 @@ def collect_gitnexus_map(workspace_root: Path, repo_path: Path, repo: RepoConfig } -def run_gitnexus_analyze(repo_path: Path, gitnexus_bin: str, timeout: int = 180) -> tuple[bool, str]: +def run_gitnexus_analyze( + repo_path: Path, gitnexus_bin: str, timeout: int = 180 +) -> tuple[bool, str]: try: result = subprocess.run( [gitnexus_bin, "analyze", str(repo_path), "--skip-agents-md"], @@ -905,10 +907,10 @@ def gitnexus_preflight( ) else: refresh_status = "failed" - refresh_error = refresh_output.splitlines()[-1] if refresh_output else "unknown error" - warnings.append( - f"{repo.repo} GitNexus refresh failed: {refresh_error}" + refresh_error = ( + refresh_output.splitlines()[-1] if refresh_output else "unknown error" ) + warnings.append(f"{repo.repo} GitNexus refresh failed: {refresh_error}") records[repo.repo] = { "before": before, "after": after, @@ -916,7 +918,9 @@ def gitnexus_preflight( "refresh_error": refresh_error, } stale_after = [ - repo for repo, record in records.items() if record["after"]["status"] in GITNEXUS_REFRESH_STATUSES + repo + for repo, record in records.items() + if record["after"]["status"] in GITNEXUS_REFRESH_STATUSES ] return { "enabled": True, @@ -1612,7 +1616,9 @@ def dropped_candidate_indexes( except (TypeError, ValueError): continue if candidates is not None: - indexes.update(candidate_title_pattern_indexes(decision, "dropped_title_patterns", candidates)) + indexes.update( + candidate_title_pattern_indexes(decision, "dropped_title_patterns", candidates) + ) return indexes @@ -1770,7 +1776,9 @@ def build_approved_issue_queue( if "approve" not in parts: continue - selected_indexes = approved_candidate_indexes(decision, len(candidates), defaults, candidates) + selected_indexes = approved_candidate_indexes( + decision, len(candidates), defaults, candidates + ) missing_indexes = sorted(index for index in selected_indexes if index > len(candidates)) if missing_indexes: warnings.append( diff --git a/scripts/upload_repo_review_issues.py b/scripts/upload_repo_review_issues.py index 168ee2a96..40c4ce0a1 100644 --- a/scripts/upload_repo_review_issues.py +++ b/scripts/upload_repo_review_issues.py @@ -94,7 +94,11 @@ def ensure_labels(repo: str, labels: list[str], prefix: list[str]) -> None: def add_missing_labels( - repo: str, issue_number: int, labels: list[str], existing_labels: list[dict[str, Any]], prefix: list[str] + repo: str, + issue_number: int, + labels: list[str], + existing_labels: list[dict[str, Any]], + prefix: list[str], ) -> None: existing = {label.get("name") for label in existing_labels} missing = [label for label in labels if label not in existing] diff --git a/tests/scripts/test_repo_review_evaluator.py b/tests/scripts/test_repo_review_evaluator.py index 0bd57bd2a..a9ea0a63b 100644 --- a/tests/scripts/test_repo_review_evaluator.py +++ b/tests/scripts/test_repo_review_evaluator.py @@ -197,7 +197,9 @@ def test_gitnexus_preflight_reports_stale_without_refresh(tmp_path: Path) -> Non (repo_dir / "README.md").write_text("# Demo\n", encoding="utf-8") subprocess = evaluator.subprocess subprocess.run(["git", "-C", str(repo_dir), "init"], check=True, capture_output=True) - subprocess.run(["git", "-C", str(repo_dir), "config", "user.email", "test@example.com"], check=True) + subprocess.run( + ["git", "-C", str(repo_dir), "config", "user.email", "test@example.com"], check=True + ) subprocess.run(["git", "-C", str(repo_dir), "config", "user.name", "Test User"], check=True) subprocess.run(["git", "-C", str(repo_dir), "add", "README.md"], check=True) subprocess.run(