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

pantsbuild / pants / 19015773527

02 Nov 2025 05:33PM UTC coverage: 17.872% (-62.4%) from 80.3%
19015773527

Pull #22816

github

web-flow
Merge a12d75757 into 6c024e162
Pull Request #22816: Update Pants internal Python to 3.14

4 of 5 new or added lines in 3 files covered. (80.0%)

28452 existing lines in 683 files now uncovered.

9831 of 55007 relevant lines covered (17.87%)

0.18 hits per line

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

0.0
/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).
UNCOV
3
from __future__ import annotations
×
4

UNCOV
5
from dataclasses import dataclass
×
UNCOV
6
from typing import Any
×
7

UNCOV
8
from pants.bsp.spec.base import BuildTargetIdentifier, Uri
×
9

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

15

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

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

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

29

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

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

43

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

UNCOV
48
    def to_json_dict(self) -> dict[str, Any]:
×
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

© 2025 Coveralls, Inc