Skip to content

fix: report missing global flag values#309

Open
Bortlesboat wants to merge 1 commit intoentrius:testfrom
Bortlesboat:fix/netuid-missing-value
Open

fix: report missing global flag values#309
Bortlesboat wants to merge 1 commit intoentrius:testfrom
Bortlesboat:fix/netuid-missing-value

Conversation

@Bortlesboat
Copy link
Copy Markdown

Summary

  • raise a clear UsageError when global flags like --netuid are missing a value
  • handle both bare --netuid and empty --netuid= forms before leftover options reach Click
  • add parser-level regression coverage for missing and valid global flag values

Fixes #238

Testing

  • pytest tests/test_global_flags.py tests/test_chains.py -q
  • ruff check allways/cli/swap_commands/helpers.py tests/test_global_flags.py
  • ruff format --check allways/cli/swap_commands/helpers.py tests/test_global_flags.py
  • git diff --check

@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI: bare global --netuid without value yields misleading Click error

1 participant