Adding support for multiline param help descriptions in Pants BUILD Dictionary

Review Request #3399 - Created Jan. 30, 2016 and submitted

Emily Caveness
benjyw, dturner-tw, zundel

In response to a user reported error that target parameter help appeared incomplete, added support for parameter help strings that span multiple lines.

Prior to this change, get_arg_descriptions_from_docstring did not suppport multiline descriptions, as was noted in the comments. However, there are numerous instances in which existing parameter help spans multiple lines, and there's nothing enforcing the single-line description convention. In addition, especially for parameters that have longer names, it may be difficult to include meaningful descriptions that span only a single line. Thus, it seemed best to go ahead and add support for multiline descriptions.

Adding support for multiline descriptions also fixed the fact that no help was appearing in the Pants BUILD Dictionary for parameters where the help string included :param name: on one line and the description on the next line. This can be seen in the help for the provides parameter of contrib_plugin (screenshots attached).

As seen in the screenshots for android_binary below, adding support for mulitline descriptions altered the formatting of the tables containing those descriptions. In particular, the parameter names sometimes wrap, and the description text is aligned in the middle of the cell. If these changes go in, I'll open another github issue on that, given my very limited css skills.



  • 0
  • 7
  • 0
  • 7
Description From Last Updated
David Turner
Benjy Weinberger
Larry Hosken
Emily Caveness
Benjy Weinberger
Eric Ayers
Stu Hood
Emily Caveness
Review request changed

Status: Closed (submitted)

Change Summary:

Merged as bb939c4a774c290cc426b502ca98c62769df7242 and published to