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

pantsbuild / pants / 21552830208

31 Jan 2026 11:40PM UTC coverage: 80.277% (-0.05%) from 80.324%
21552830208

Pull #23062

github

web-flow
Merge 808a9786c into 2c4dcf9cf
Pull Request #23062: Remove support for Get

18 of 25 new or added lines in 4 files covered. (72.0%)

17119 existing lines in 541 files now uncovered.

78278 of 97510 relevant lines covered (80.28%)

3.36 hits per line

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

76.09
/src/python/pants/jvm/bsp/spec.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
1✔
4

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

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

10

UNCOV
11
@dataclass(frozen=True)
1✔
UNCOV
12
class JvmBuildTarget:
1✔
13
    # Uri representing absolute path to jdk
14
    # For example: file:///usr/lib/jvm/java-8-openjdk-amd64
UNCOV
15
    java_home: Uri | None = None
1✔
16

17
    # The java version this target is supposed to use.
18
    # For example: 1.8
UNCOV
19
    java_version: str | None = None
1✔
20

UNCOV
21
    @classmethod
1✔
UNCOV
22
    def from_json_dict(cls, d: dict[str, Any]) -> Any:
1✔
23
        return cls(
×
24
            java_home=d.get("javaHome"),
25
            java_version=d.get("javaVersion"),
26
        )
27

UNCOV
28
    def to_json_dict(self) -> dict[str, Any]:
1✔
UNCOV
29
        result = {}
1✔
UNCOV
30
        if self.java_home is not None:
1✔
UNCOV
31
            result["javaHome"] = self.java_home
1✔
UNCOV
32
        if self.java_version is not None:
1✔
UNCOV
33
            result["javaVersion"] = self.java_version
1✔
UNCOV
34
        return result
1✔
35

36

UNCOV
37
@dataclass(frozen=True)
1✔
UNCOV
38
class MavenDependencyModuleArtifact:
1✔
UNCOV
39
    uri: Uri
1✔
UNCOV
40
    classifier: str | None = None
1✔
41

UNCOV
42
    @classmethod
1✔
UNCOV
43
    def from_json_dict(cls, d: dict[str, Any]) -> Any:
1✔
44
        return cls(uri=d["uri"], classifier=d.get("classifier"))
×
45

UNCOV
46
    def to_json_dict(self) -> Any:
1✔
47
        result = {"uri": self.uri}
×
48
        if self.classifier is not None:
×
49
            result["classifier"] = self.classifier
×
50
        return result
×
51

52

UNCOV
53
@dataclass(frozen=True)
1✔
UNCOV
54
class MavenDependencyModule(BSPData):
1✔
55
    """Maven-related module metadata."""
56

UNCOV
57
    organization: str
1✔
UNCOV
58
    name: str
1✔
UNCOV
59
    version: str
1✔
UNCOV
60
    scope: str | None
1✔
UNCOV
61
    artifacts: tuple[MavenDependencyModuleArtifact, ...]
1✔
62

UNCOV
63
    DATA_KIND = "maven"
1✔
64

UNCOV
65
    @classmethod
1✔
UNCOV
66
    def from_json_dict(cls, d: dict[str, Any]) -> Any:
1✔
67
        return cls(
×
68
            organization=d["organization"],
69
            name=d["name"],
70
            version=d["version"],
71
            scope=d.get("scope"),
72
            artifacts=tuple(
73
                MavenDependencyModuleArtifact.from_json_dict(ma) for ma in d.get("artifacts", [])
74
            ),
75
        )
76

UNCOV
77
    def to_json_dict(self) -> Any:
1✔
78
        result = {
×
79
            "organization": self.organization,
80
            "name": self.name,
81
            "version": self.version,
82
            "artifacts": [ma.to_json_dict() for ma in self.artifacts],
83
        }
84
        if self.scope is not None:
×
85
            result["scope"] = self.scope
×
86
        return result
×
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