Skip to content

Use argparse to process arguments to /source - #2205

Merged
rolandwalker merged 1 commit into
mainfrom
RW/argparse-for-source-processing
Sep 5, 2026
Merged

Use argparse to process arguments to /source#2205
rolandwalker merged 1 commit into
mainfrom
RW/argparse-for-source-processing

Conversation

@rolandwalker

Copy link
Copy Markdown
Contributor

Description

This makes the custom code around /source marginally simpler, though there is still some hard-coding, and it would be better if

  • argparse was baked in to registering any special command
  • completions were generated entirely from the argparse spec

Some very minor functionality is gained in the form of recognition of double-dash for option termination, but this is noted in the changelog only as an internal refactor.

Checklist

  • I added this contribution to the changelog.md file.
  • I added my name to the AUTHORS file (or it's already there).
  • To lint and format the code, I ran
    uv run ruff check && uv run ruff format && uv run mypy --install-types .

This makes the custom code around /source marginally simpler, though
there is still some hard-coding, and it would be better if

 * argparse was baked in to registering any special command
 * completions were generated entirely from the argparse spec

Some very minor functionality is gained in the form of recognition of
double-dash for option termination, but this is noted in the changelog
only as an internal refactor.
@rolandwalker rolandwalker self-assigned this Sep 5, 2026
@rolandwalker
rolandwalker merged commit 35aa66a into main Sep 5, 2026
11 checks passed
@rolandwalker
rolandwalker deleted the RW/argparse-for-source-processing branch September 5, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant