Add a get_rank() method to OptionValueContainer.

Review Request #2431 - Created June 30, 2015 and submitted

Information
Benjy Weinberger
pants
76d9610...
Reviewers
pants-reviews
jsirois, patricklaw
It returns the rank of the value at the specified key.
This will be useful in another change I'm working on that
reworks the option help system.

Unit tests pass locally. Full CI passed here: https://travis-ci.org/pantsbuild/pants/builds/69067709.

Issues

  • 0
  • 1
  • 0
  • 1
Description From Last Updated
Benjy Weinberger
Patrick Lawson
Benjy Weinberger
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted as 11c9ae750122dc6b0a7ca371919eaf3adafdff6f.

Nick Howard (Twitter)

   

Should this also return ranks of keys where the key isn't forwarded? It looks __setattr__ thinks that is possible.

  1. Maybe? Can't hurt. Will add in a separate change.

Loading...