Skip to content

Commit

Permalink
Remove redundancy in injection.
Browse files Browse the repository at this point in the history
  • Loading branch information
stuhood committed Mar 19, 2018
1 parent bfac970 commit bdc4688
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/python/pants_test/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,10 +442,9 @@ def targets(self, spec):
"""

spec = CmdLineSpecParser(self.build_root).parse_spec(spec)
addresses = list(self.address_mapper.scan_specs([spec]))
for address in addresses:
self.build_graph.inject_address_closure(address)
targets = [self.build_graph.get_target(address) for address in addresses]
targets = []
for address in self.build_graph.inject_specs_closure([spec]):
targets.append(self.build_graph.get_target(address))
return targets

def create_library(self, path, target_type, name, sources=None, **kwargs):
Expand Down

0 comments on commit bdc4688

Please sign in to comment.