• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 20772612304

07 Jan 2026 06:21AM UTC coverage: 78.855% (-1.4%) from 80.283%
20772612304

Pull #22981

github

web-flow
Merge b6d12d53b into 4414e420c
Pull Request #22981: make `shell_command` targets be runnable via the `run` goal

44 of 66 new or added lines in 3 files covered. (66.67%)

915 existing lines in 53 files now uncovered.

74296 of 94219 relevant lines covered (78.85%)

3.2 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

79.17
/src/python/pants/bsp/spec/resources.py
1
# Copyright 2022 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
3
from __future__ import annotations
1✔
4

5
from dataclasses import dataclass
1✔
6
from typing import Any
1✔
7

8
from pants.bsp.spec.base import BuildTargetIdentifier, Uri
1✔
9

10
# -----------------------------------------------------------------------------------------------
11
# Resources Request
12
# See https://build-server-protocol.github.io/docs/specification.html#resources-request
13
# -----------------------------------------------------------------------------------------------
14

15

16
@dataclass(frozen=True)
1✔
17
class ResourcesParams:
1✔
18
    targets: tuple[BuildTargetIdentifier, ...]
1✔
19

20
    @classmethod
1✔
21
    def from_json_dict(cls, d: dict[str, Any]) -> Any:
1✔
UNCOV
22
        return cls(
×
23
            targets=tuple(BuildTargetIdentifier.from_json_dict(x) for x in d["targets"]),
24
        )
25

26
    def to_json_dict(self) -> dict[str, Any]:
1✔
UNCOV
27
        return {"targets": [tgt.to_json_dict() for tgt in self.targets]}
×
28

29

30
@dataclass(frozen=True)
1✔
31
class ResourcesItem:
1✔
32
    target: BuildTargetIdentifier
1✔
33
    # List of resource files.
34
    resources: tuple[Uri, ...]
1✔
35

36
    def to_json_dict(self):
1✔
UNCOV
37
        result = {
×
38
            "target": self.target.to_json_dict(),
39
            "resources": self.resources,
40
        }
UNCOV
41
        return result
×
42

43

44
@dataclass(frozen=True)
1✔
45
class ResourcesResult:
1✔
46
    items: tuple[ResourcesItem, ...]
1✔
47

48
    def to_json_dict(self) -> dict[str, Any]:
1✔
UNCOV
49
        return {
×
50
            "items": [ri.to_json_dict() for ri in self.items],
51
        }
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc