Skip to content

refactor: remove unused parse_repo_name and its Dict import#1258

Open
ebios-star wants to merge 1 commit into
entrius:testfrom
ebios-star:refactor/remove-unused-parse-repo-name
Open

refactor: remove unused parse_repo_name and its Dict import#1258
ebios-star wants to merge 1 commit into
entrius:testfrom
ebios-star:refactor/remove-unused-parse-repo-name

Conversation

@ebios-star
Copy link
Copy Markdown
Contributor

Summary

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 --include='*.py' . across gittensor/, neurons/, and tests/ returns only the definition line — no remaining call sites.

Dropping the function also frees the only consumer of from typing import Dict in this module, so the import goes with it.

Net: -6 lines, single file. Matches the dead-code-removal precedent from #437, #448, #466.

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other

Testing

  • pytest tests/ — all 725 tests pass.

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Changes are documented (if applicable)

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 entrius#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.
@ebios-star
Copy link
Copy Markdown
Contributor Author

@anderdc whenever you have a moment, this is a small dead-code cleanup — parse_repo_name has no remaining call sites after the legacy strip in #1202. Happy to revise scope if you'd prefer. Thanks!

@xiao-xiao-mao xiao-xiao-mao Bot added the refactor Code restructuring without behavior change label May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Code restructuring without behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant