New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SubCommand
enum variant with fields duplicates parent attributes
#418
Labels
bug
This is a BUG. The fix may be released in a patch version even if considered breaking
Comments
I'm able to confirm the duplicate |
TeXitoi
added
the
bug
This is a BUG. The fix may be released in a patch version even if considered breaking
label
Sep 25, 2020
0xazure
added a commit
to 0xazure/sidecar
that referenced
this issue
Nov 24, 2020
structopt currently has a bug [0] where it duplicates visible aliases in the help output, so we remove command aliases until this bug is fixed. [0]: TeXitoi/structopt#418
michiel-de-muynck
added a commit
to michiel-de-muynck/structopt
that referenced
this issue
Oct 13, 2021
This commit fixes the issue where all top level methods were duplicated for subcommands with fields (see issue TeXitoi#418). For some attributes, such as aliases, this resulted in duplicate output.
TeXitoi
pushed a commit
that referenced
this issue
Oct 18, 2021
This commit fixes the issue where all top level methods were duplicated for subcommands with fields (see issue #418). For some attributes, such as aliases, this resulted in duplicate output.
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This example:
Produces this output:
Where we see the
reticulate
command has theret
alias appear twice. Looking at the expanded code:The
about
,visible_alias
, andversion
functions onsubcommand
are called twice. In contrast, theFrobnicate
case in theCommand
enum does not exhibit this behavior, as it does not contain any fields, so does not include a callsubcommand.arg
:I believe this duplication arises from this or this code, but I am not sure if simply removing would break other cases or not.
The text was updated successfully, but these errors were encountered: