refactor: use shared NETWORK_CHOICE constant in mutations.py - #455
Merged
anderdc merged 2 commits intoApr 15, 2026
Merged
Conversation
anderdc
approved these changes
Apr 15, 2026
anderdc
approved these changes
Apr 15, 2026
This was referenced Apr 30, 2026
ebios-star
added a commit
to ebios-star/gittensor
that referenced
this pull request
May 6, 2026
…ers.py Two `validate_repository` / `validate_github_issue` requests hardcoded `https://api.github.com/...` instead of reusing the existing `gittensor.constants.BASE_GITHUB_API_URL`. The file already imports from `gittensor.constants` (NETWORK_MAP); just add the existing constant alongside. Same shape as entrius#455 (use shared NETWORK_CHOICE constant).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace two hardcoded
click.Choice(['finney', 'test', 'local'], case_sensitive=False)instances inmutations.pywith the existingNETWORK_CHOICEconstant already defined inhelpers.py.This eliminates the duplicate definition and ensures network choices stay consistent if the list changes.
Type of Change
Testing
ruff checkpassesruff format --checkpassespyrightpasses (0 errors)NETWORK_CHOICEresolves correctlyChecklist
cc @anderdc @LandynDev