Add description to type constraints

Review Request #4233 — Created Sept. 13, 2016 and submitted

nhoward_tw
pants
3865
4236
pants-reviews
jsirois, kwlzn, stuhood, yujiec

In cases when a type constraints types are multitudinous, it's nice to have repr / str display a human friendly name instead of the long list of types.

It's not used as of this patch, but it's a distinct optional dependency of a larger patch I'm working on. In that patch, I'm adding type constraints with the type contents of the BUILD file symbol tables. These are long enough and not obviously about parsing that I felt like having this is worth while.

Added tests covering Exactly's repr and strs.

JS
  1. Ship It!
  2. 
      
ST
  1. 
      
  2. Unrelated, but would like to see parens in case of a list... =A, B doesn't parse very easily.

  3. 
      
NH
NH
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted as https://github.com/pantsbuild/pants/commit/d30cca1e0ecb9cc0e1b7e2cd0ff6e7e077e62a52
Loading...