python-fire icon indicating copy to clipboard operation
python-fire copied to clipboard

Missing helptext for multiline argument.

Open MichaelCG8 opened this issue 4 years ago • 4 comments

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 avatar Jan 17 '21 20:01 MichaelCG8

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(')

MichaelCG8 avatar Jan 17 '21 20:01 MichaelCG8

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

xosnos avatar Apr 24 '21 04:04 xosnos

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

MichaelCG8 avatar Apr 24 '21 08:04 MichaelCG8

Any help at all with this issue would be very nice. Thank you! 

Sent from Yahoo Mail for iPhone

On Saturday, April 24, 2021, 12:32 AM, Steven Nguyen @.***> wrote:

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

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Janeenm avatar Apr 24 '21 10:04 Janeenm