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

pantsbuild / pants / 21042790249

15 Jan 2026 06:57PM UTC coverage: 43.263% (-35.4%) from 78.666%
21042790249

Pull #23021

github

web-flow
Merge cc03ad8de into d250c80fe
Pull Request #23021: WIP gh workflow scie pex

23 of 33 new or added lines in 3 files covered. (69.7%)

16147 existing lines in 521 files now uncovered.

26164 of 60477 relevant lines covered (43.26%)

0.87 hits per line

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

0.0
/src/python/pants/backend/java/dependency_inference/types.py
1
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
3

UNCOV
4
from __future__ import annotations
×
5

UNCOV
6
from collections.abc import Sequence
×
UNCOV
7
from dataclasses import dataclass
×
UNCOV
8
from typing import Any
×
9

10

UNCOV
11
@dataclass(frozen=True)
×
UNCOV
12
class JavaImport:
×
UNCOV
13
    name: str
×
UNCOV
14
    is_static: bool = False
×
UNCOV
15
    is_asterisk: bool = False
×
16

UNCOV
17
    @classmethod
×
UNCOV
18
    def from_json_dict(cls, imp: dict[str, Any]) -> JavaImport:
×
19
        return cls(
×
20
            name=imp["name"],
21
            is_asterisk=imp["isAsterisk"],
22
            is_static=imp["isStatic"],
23
        )
24

UNCOV
25
    def to_debug_json_dict(self) -> dict[str, Any]:
×
26
        return {
×
27
            "name": self.name,
28
            "is_static": self.is_static,
29
            "is_asterisk": self.is_asterisk,
30
        }
31

32

UNCOV
33
@dataclass(frozen=True)
×
UNCOV
34
class JavaSourceDependencyAnalysis:
×
UNCOV
35
    declared_package: str | None
×
UNCOV
36
    imports: Sequence[JavaImport]
×
UNCOV
37
    top_level_types: Sequence[str]
×
UNCOV
38
    consumed_types: Sequence[str]
×
UNCOV
39
    export_types: Sequence[str]
×
40

UNCOV
41
    @classmethod
×
UNCOV
42
    def from_json_dict(cls, analysis: dict[str, Any]) -> JavaSourceDependencyAnalysis:
×
43
        return cls(
×
44
            declared_package=analysis.get("declaredPackage"),
45
            imports=tuple(JavaImport.from_json_dict(imp) for imp in analysis["imports"]),
46
            top_level_types=tuple(analysis["topLevelTypes"]),
47
            consumed_types=tuple(analysis["consumedTypes"]),
48
            export_types=tuple(analysis["exportTypes"]),
49
        )
50

UNCOV
51
    def to_debug_json_dict(self) -> dict[str, Any]:
×
52
        return {
×
53
            "declared_package": self.declared_package,
54
            "imports": [imp.to_debug_json_dict() for imp in self.imports],
55
            "top_level_types": self.top_level_types,
56
            "consumed_types": self.consumed_types,
57
            "export_types": self.export_types,
58
        }
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