Skip to content
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

First attempt at #113: Support help strings for CLI arguments #1

Closed
wants to merge 3 commits into from

Conversation

csr
Copy link
Member

@csr csr commented Jun 9, 2020

@IamCathal and I are seeking feedback on the code we wrote to get a description of the arguments (original issue: [FEATURE] Support help strings for CLI arguments). This is how we thought about implementing it:

  • Add help parameter to Argument, ArgumentInfo, and ParameterInfo classes
  • Create a get_arguments_description_from_info function that given an instance of CommandInfo returns an array of descriptions for the ArgumentInfo objects. Each description has the name and the help attributes (how do we get the type out of an annotation object)?

Would this be the right way ahead, or should we look into implementing it using something different? Eventually, we would create a string out of the args_descriptions list and pass it to command.cls(..., help=our_string_here). We also noticed the text that goes into help does get some formatting (leading spaces).

This is obviously not meant to be merged - just looking for initial feedback on code styling ad logic (any feedback is welcome).

@csr
Copy link
Member Author

csr commented Jun 10, 2020

I'm going to close this as this issue is a little bit more complex than we anticipated. We'll be focusing on [BUG] typer.main.get_group should return a click.Group next.

@csr csr closed this Jun 10, 2020
@csr csr deleted the csr-113-add-args-help-string branch June 10, 2020 06:50
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