-
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
Multi-line parameter descriptions in Google-style docstrings #261
Comments
I actually thought we supported this already - I'll mark it as a bug. Yes, we would like for this to work. |
Thanks @dbieber! |
I've seen the same using Numpy style docstrings, I'll find an example and add it later. I'll look into this tonight and see if it's something I can help with. |
I've experimented and found the following.
I access the help text using
|
Okay, there appears to be two issues. The issue with The issue with I've put the fix in a fork here https://github.com/MichaelCG8/python-fire/tree/issue-261-bugfix-multi-line-docstring-parameter-descriptions so feel free to have a look at that. Next I'll add some tests for these cases, then I'll open a pull request. |
Thanks for the fix! The next feature-ful release doesn't have a date or ETA yet. The two primary goals for that are to 1) enable configs similar to what is discussed in #188 (display, serialize), and 2) enable a strict type mode, allowing Fire to benefit from type hints and prevent accidental type mismatches (such as passing an int to a function that expects a string). We can plan smaller releases before then on an as-needed basis, such as to release bug fixes like this one. The time from bug-fix to merge to release might be a few weeks (this is a high variance, rough estimate) depending on how busy @joejoevictor and I are. |
Hi, thanks for the info! Number 2 sounds interesting, is there an existing issue open for that? |
We have been avid users of Fire (thank you for making it available!) and recently ran into this issue as well. @MichaelCG8 with your PR would the following work as well?
|
@orkun1675 No, my PR doesn't fix that case, but I can see the cause. I've opened #309 to track. |
Done in #262 |
Hey there! Quick question regarding the behavior of multi-line parameter descriptions in Google-style docstrings.
Consider the following code:
When running
main.py --help
, the resultingman
is:Notice that we are losing the following line here.
I'd expect the newline-containing description to be un-newlined (definitely not a word)
Or maybe included with the newline, but in some way retaining the following line. Any plans to support this, or (likely) am I missing something?
The text was updated successfully, but these errors were encountered: