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

pantsbuild / pants / 24068485941

07 Apr 2026 06:52AM UTC coverage: 75.981% (-16.9%) from 92.908%
24068485941

Pull #23227

github

web-flow
Merge 7f50667e7 into 542ca048d
Pull Request #23227: Fix uv PEX builder to use pex3 lock export

0 of 12 new or added lines in 1 file covered. (0.0%)

11082 existing lines in 400 files now uncovered.

54018 of 71094 relevant lines covered (75.98%)

2.32 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