From b897676e01e4f24a9995dfda48d923eaea726ab3 Mon Sep 17 00:00:00 2001 From: Vinta Chen Date: Sun, 19 Apr 2026 21:53:39 +0800 Subject: [PATCH] refactor(fetch_github_stars): remove redundant early-return guard in build_graphql_query The empty-parts check after the loop makes the upfront `if not repos: return ""` guard redundant. Co-Authored-By: Claude --- website/fetch_github_stars.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/website/fetch_github_stars.py b/website/fetch_github_stars.py index 741ac07d..2ac0ef65 100644 --- a/website/fetch_github_stars.py +++ b/website/fetch_github_stars.py @@ -46,8 +46,6 @@ def save_cache(cache: dict) -> None: def build_graphql_query(repos: list[str]) -> str: """Build a GraphQL query with aliases for up to 100 repos.""" - if not repos: - return "" parts = [] for i, repo in enumerate(repos): owner, name = repo.split("/", 1)