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

Missing helptext for multiline argument. #309

Open
MichaelCG8 opened this issue Jan 17, 2021 · 4 comments · May be fixed by #335
Open

Missing helptext for multiline argument. #309

MichaelCG8 opened this issue Jan 17, 2021 · 4 comments · May be fixed by #335

Comments

@MichaelCG8
Copy link
Contributor

Only the first line of help text is displayed for argument name.
Thanks @orkun1675 for reporting.

def foo(self, name):
    """Greets name.

    Arguments:
      name: The person to greet. This is a very long line that has to be word
        wrapped and contains a colon (:) in it.
    """
    print('Hello %s' % name)
@MichaelCG8
Copy link
Contributor Author

fire.docstrings._consume_google_args_line() processes the missing line as though it is an arg and type. Potentially fixable by being more selective about what constitutes a new arg line (not just that it contains a colon) or being more clever in the call to _as_arg_name_and_type which currently takes everything before the colon and returns ('wrapped', 'and contains a colon(')

@xosnos
Copy link

xosnos commented Apr 24, 2021

Hi, this is my first time contributing to open source. I will take on this issue

@MichaelCG8
Copy link
Contributor Author

Thanks @xosnos ! If you'd like me to review anything let me know :)

@Janeenm
Copy link

Janeenm commented Apr 24, 2021 via email

xosnos added a commit to xosnos/python-fire that referenced this issue Apr 24, 2021
xosnos added a commit to xosnos/python-fire that referenced this issue Apr 24, 2021
@xosnos xosnos linked a pull request Apr 24, 2021 that will close this issue
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 a pull request may close this issue.

3 participants