[FIX] odev: sort help arguments and fix alignment#152
Merged
Conversation
brinkflew
requested changes
Apr 28, 2026
brinkflew
approved these changes
Apr 28, 2026
- Arguments in `odev help <command>` are now sorted alphabetically (positionals first, optionals next, greedy catch-all last). - Fixed a long-standing alignment bug in the help output where the first line of an indented block (arguments, descriptions, command lists) was often double-indented or misaligned. - Refactored `string.normalize_indent` to use `inspect.cleandoc` for more robust docstring handling. - Unified indentation management in `HelpCommand` by using a consistent column-0 placeholder pattern. Assisted-by: antigravity <noreply@google.com>
- Fix positional argument sorting in base.py to preserve declaration order, preventing regressions in commands like 'restore'. - Improve logging.py to avoid misinterpreting '-v' from tools like pytest as a log level. Assisted-by: antigravity <noreply@google.com>
Assisted-by: gemini-3-flash <noreply@google.com>
93d28a0 to
cbd4df5
Compare
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
This PR fixes two major issues in the
odevhelp output:Changes
Command.convert_argumentsinbase.pyto implement complex sorting logic.string.normalize_indentto useinspect.cleandocfor reliable docstring normalization.HelpCommandtemplates inhelp.pyto use a column-0 placeholder pattern, preventing double indentation of the first line.format_options_listinstring.pyto return uniformly indented blocks.Screenshots / Recordings
Before
After
Assisted-by: antigravity noreply@google.com