'goal builddict' Target classes "inherit" docstrings, signatures

Review Request #1018 - Created Sept. 11, 2014 and submitted

Information
Larry Hosken
pants
2bff34c...
Reviewers
pants-reviews
patricklaw

Nowadays, our BUILD target implementations use class inheritance + some constructor idioms. But the BUILD Dictionary hasn't kept up. Thus, we have boilerplate docstrings and documented signatures like android_binary(build_type=None, *args, **kwargs)

This change...

Special-cases target handling in src/python/pants/backend/core/tasks/builddictionary.py to go up the inheritence tree, pull apart and re-assemble signatures and docstrings. Also, special-cases leaving out implementation-params we don't want in the user-facing doc (address, build_graph, payload). It doesn't have a general mechanism for leaving stuff out, though. E.g., python_binary's entry thinks it has a sources param (inherited from PythonTarget); mitigated by having a docstring for it saying "overridden: use source instead".

Removes many many redundant docstring fragments. My search wasn't scientific. Probably other removal-worthy pieces lurk.

Adds some docstrings. E.g. python_binary's "sources: overridden". Move some docstrings to superclass for easier inheriting.

https://travis-ci.org/pantsbuild/pants/builds/35031071

Issues

  • 0
  • 6
  • 0
  • 6
Description From Last Updated
Patrick Lawson
Larry Hosken
Larry Hosken
Review request changed

Status: Closed (submitted)

Loading...