-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Multiline docstring in help with parameters and their descriptions #181
Comments
Agreed on multi-line docstrings. This is particularly important if people use whitespace for formatting in their docstrings, such as including usage examples. The param descriptions should be showing up in the help in a separate section from the description. If that's not showing up, that's a bug. The return and raises information is being parsed but isn't being displayed yet, but should be in a later version. |
Yes I think right now the params formatted like :param name name of the user
:param surname surname of the user aren't getting displayed in the help screen. |
Multi-line docstrings issue is resolved. As for the params, it works if you 1) add the missing E.g. if you update your code to this:
Then these work:
Of course we want our docstring parser to be as lenient as reasonably possible, so if we're able to support parsing args from your docstrings without compromising our ability to parse other docstrings, then we will. So, I'll leave the issue open for more flexibly/leniently parsing docstrings. |
Hello, I need the configuration information of all cloud servers under my account and all the areas where cloud servers can be built. Please provide examples of the corresponding API and python code. |
Hi okada8, I think your request is misplaced. This is an issue thread for Python Fire. |
Is there any way to display the arguments from the docstring, even if they're not an explicitly named parameter in the function signature? In the example before, we accept bar as part of kwargs (and document that), but it won't show up in Fire. def func(self, foo, **kwargs):
"""
:param str foo: (required) This argument shows up
:param str bar: (optional) This argument doesn't show up
""" |
This is a very developer-centric view. |
I'm using the latest version of Fire as of now and was wondering if it's possible to display a multiline docstring in help instead of concatenating it to one line. Also is there a way of displaying the available params and their descriptions in the help screen?
Example program:
Expected help:
Example command help (more specific)
The text was updated successfully, but these errors were encountered: