PR-1282: Fix duplicate 'Other' section in clarifai CLI --help output#974
Open
ackizilkale wants to merge 1 commit intomasterfrom
Open
PR-1282: Fix duplicate 'Other' section in clarifai CLI --help output#974ackizilkale wants to merge 1 commit intomasterfrom
ackizilkale wants to merge 1 commit intomasterfrom
Conversation
LazyAliasedGroup.list_commands() was returning all lazy_mapping keys including short aliases (a, af, cc, pl, etc.) as separate commands, causing them to appear in a second "Other:" catch-all section. - Add _lazy_primary_names set to only expose canonical command names in --help - Fix command_sections: add missing commands (logout, app), fix pipeline-step -> pipelinestep - Deduplicate alias display in format_commands() to avoid redundant alias labels Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Minimum allowed line rate is |
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
clarifai --helpwas showing two "Other:" sections with duplicate/aliased commandsLazyAliasedGroup.list_commands()returned alllazy_mappingkeys (including short aliases likea,af,cc,pl) as separate commandscommand_sectionswas missinglogout,app, and had wrong keypipeline-stepinstead ofpipelinestepChanges
clarifai/utils/cli.py: Added_lazy_primary_namesset solist_commands()only returns canonical names (not aliases). Fixedformat_commands()to not show redundant alias labels.clarifai/cli/base.py: Fixedcommand_sections— addedlogoutto Auth,appto Other, fixedpipeline-step→pipelinestepin Pipelines.Before
After
Test plan
clarifai --helpshows single clean output with no duplicate sectionsclarifai pl,clarifai ps,clarifai a)Jira: PR-1282
🤖 Generated with Claude Code