Skip to content

refactor: use shared NETWORK_CHOICE constant in mutations.py - #455

Merged
anderdc merged 2 commits into
entrius:testfrom
t7929375-eng:refactor/use-network-choice-constant
Apr 15, 2026
Merged

refactor: use shared NETWORK_CHOICE constant in mutations.py#455
anderdc merged 2 commits into
entrius:testfrom
t7929375-eng:refactor/use-network-choice-constant

Conversation

@t7929375-eng

Copy link
Copy Markdown
Contributor

Summary

Replace two hardcoded click.Choice(['finney', 'test', 'local'], case_sensitive=False) instances in mutations.py with the existing NETWORK_CHOICE constant already defined in helpers.py.

This eliminates the duplicate definition and ensures network choices stay consistent if the list changes.

Type of Change

  • Refactoring (no functional change)

Testing

  • ruff check passes
  • ruff format --check passes
  • pyright passes (0 errors)
  • Import test verifies NETWORK_CHOICE resolves correctly

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • No behavioral change — only import + constant reference

cc @anderdc @LandynDev

@anderdc
anderdc merged commit 2145471 into entrius:test Apr 15, 2026
4 checks passed
@anderdc anderdc added the refactor Code restructuring without behavior change label Apr 16, 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).
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.

2 participants