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

Docstring description multiline parsing #476

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
cleaned py file
  • Loading branch information
thebadcoder96 committed Dec 23, 2023
commit 6f0ce182e17260b0b2237da94f5dd8053c1ca70c
4 changes: 2 additions & 2 deletions fire/docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def parse(docstring):

args.extend([KwargInfo(
name=arg.name, type=_cast_to_known_type(_join_lines(arg.type.lines)),
description=_join_lines(arg.description.lines, 'description')) for arg in state.kwargs])
description=_join_lines(arg.description.lines)) for arg in state.kwargs])

return DocstringInfo(
summary=summary,
Expand Down Expand Up @@ -239,7 +239,7 @@ def _is_blank(line):
return not line or line.isspace()


def _join_lines(lines, type=None):
def _join_lines(lines):
"""Joins lines with the appropriate connective whitespace.

This puts a single space between consecutive lines, unless there's a blank
Expand Down