Skip to content

Commit

Permalink
rely on targets injection into peek params
Browse files Browse the repository at this point in the history
# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
  • Loading branch information
jriddy committed Jul 19, 2021
1 parent ac6db67 commit 9ed76cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions src/python/pants/backend/project_info/peek.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

import collections.abc
Expand All @@ -10,7 +10,7 @@

from pkg_resources import Requirement

from pants.engine.addresses import Address, Addresses, BuildFileAddress
from pants.engine.addresses import Address, BuildFileAddress
from pants.engine.console import Console
from pants.engine.fs import DigestContents, FileContent, PathGlobs
from pants.engine.goal import Goal, GoalSubsystem, Outputting
Expand Down Expand Up @@ -130,11 +130,8 @@ def default(self, o):
async def peek(
console: Console,
subsys: PeekSubsystem,
addresses: Addresses,
targets: UnexpandedTargets,
) -> Peek:
targets: Iterable[Target]
targets = await Get(UnexpandedTargets, Addresses, addresses)

if subsys.output_type == OutputOptions.RAW:
build_file_addresses = await MultiGet(
Get(BuildFileAddress, Address, t.address) for t in targets
Expand Down
2 changes: 1 addition & 1 deletion src/python/pants/backend/project_info/peek_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

from textwrap import dedent
Expand Down

0 comments on commit 9ed76cd

Please sign in to comment.