[engine] Introduce TypeConstraint#satisfied_by_type

Review Request #4260 — Created Sept. 26, 2016 and submitted

nhoward_tw
pants
3903
pants-reviews
kwlzn, stuhood, yujiec

For doing static analysis with TypeConstraints, it's helpful to be able to test the types directly.

This introduces an interface for doing that, TypeConstraint#satisfied_by_type.

CI away on the associated PR. I also added a unit test.

KW
  1. lgtm

  2. 
      
ST
  1. Sidenote: this review seems a bit small to have bothered splitting out.

    1. Fair point. It does make it trivial to review though.

    2. And to bikeshed =)

  2. src/python/pants/engine/addressable.py (Diff revision 1)
     
     
     
     
     
     
     
     
     
     

    For symmetry, seems like this might be satisfied_by, and satisfied_by_type?

  3. 
      
NH
NH
YU
  1. Ship It!
  2. 
      
NH
Review request changed

Status: Closed (submitted)

Change Summary:

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