From f0490596d0bf59483ca52c3250a845d99df2c493 Mon Sep 17 00:00:00 2001 From: Terry Tipton Date: Wed, 13 May 2026 15:22:33 -0400 Subject: [PATCH] refactor: remove unused parse_repo_name and its Dict import parse_repo_name was the legacy GraphQL response parser that wrapped repo_data['owner']['login'] + repo_data['name'] into a lowercased 'owner/repo' string. The legacy scoring pipeline that called it was stripped in #1202, and the mirror path uses MirrorPullRequest.repo_full_name directly (already lowercased at parse time in MirrorPullRequest.from_dict). grep -rn parse_repo_name across gittensor/, neurons/, and tests/ returns only the definition line. Dropping the function also frees the only consumer of 'from typing import Dict' in this module, so the import goes with it. --- gittensor/utils/utils.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/gittensor/utils/utils.py b/gittensor/utils/utils.py index 4e1b3276..db77f6ff 100644 --- a/gittensor/utils/utils.py +++ b/gittensor/utils/utils.py @@ -3,18 +3,12 @@ """ import os -from typing import Dict def backoff_seconds(attempt: int, base: int = 5, cap: int = 30) -> int: return min(base * (2**attempt), cap) -def parse_repo_name(repo_data: Dict): - """Normalizes and converts repository name from dict""" - return f'{repo_data["owner"]["login"]}/{repo_data["name"]}'.lower() - - def get_contract_address() -> str: """Get contract address. Override via CONTRACT_ADDRESS env var for dev/testing.