Conversation
Co-authored-by: Copilot <copilot@github.com>
There was a problem hiding this comment.
Pull request overview
Refactors Command parsing to reduce duplication by extracting a shared lexing/dispatch loop and common storage helpers, aiming to keep parse_arguments() and parse_known_arguments() aligned.
Changes:
- Replaces the inline parse loop in
parse_arguments()with a shared_run_parse_loop(...). - Updates
parse_known_arguments()to use_run_parse_loop(...)and limits its post-parse phases (no prompting/confirmation). - Extracts repeated parsing/storage logic into helpers (
_store_scalar_value,_increment_count,_consume_nargs,_find_remainder_slot).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <copilot@github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <copilot@github.com>
This PR refactors
Commandparsing to reduce duplication by extracting a shared lexing/dispatch loop and common storage helpers, aiming to keepparse_arguments()andparse_known_arguments()aligned.Changes:
parse_arguments()with a shared_run_parse_loop(...).parse_known_arguments()to use_run_parse_loop(...)and limits its post-parse phases (no prompting/confirmation)._store_scalar_value,_increment_count,_consume_nargs,_find_remainder_slot).