• 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/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

© 2025 Coveralls, Inc