• 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

73.91
/src/python/pants/backend/codegen/thrift/tailor.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
4✔
5

UNCOV
6
from dataclasses import dataclass
4✔
7

UNCOV
8
from pants.backend.codegen.thrift.subsystem import ThriftSubsystem
4✔
UNCOV
9
from pants.backend.codegen.thrift.target_types import ThriftSourcesGeneratorTarget
4✔
UNCOV
10
from pants.core.goals.tailor import (
4✔
11
    AllOwnedSources,
12
    PutativeTarget,
13
    PutativeTargets,
14
    PutativeTargetsRequest,
15
)
UNCOV
16
from pants.engine.intrinsics import path_globs_to_paths
4✔
UNCOV
17
from pants.engine.rules import collect_rules, rule
4✔
UNCOV
18
from pants.engine.unions import UnionRule
4✔
UNCOV
19
from pants.util.dirutil import group_by_dir
4✔
UNCOV
20
from pants.util.logging import LogLevel
4✔
21

22

UNCOV
23
@dataclass(frozen=True)
4✔
UNCOV
24
class PutativeThriftTargetsRequest(PutativeTargetsRequest):
4✔
UNCOV
25
    pass
4✔
26

27

UNCOV
28
@rule(level=LogLevel.DEBUG, desc="Determine candidate Thrift targets to create")
4✔
UNCOV
29
async def find_putative_thrift_targets(
4✔
30
    req: PutativeThriftTargetsRequest,
31
    all_owned_sources: AllOwnedSources,
32
    thrift_subsystem: ThriftSubsystem,
33
) -> PutativeTargets:
34
    if not thrift_subsystem.tailor:
×
35
        return PutativeTargets()
×
36

37
    all_thrift_files = await path_globs_to_paths(req.path_globs("*.thrift"))
×
38
    unowned_thrift_files = set(all_thrift_files.files) - set(all_owned_sources)
×
39
    pts = [
×
40
        PutativeTarget.for_target_type(
41
            ThriftSourcesGeneratorTarget,
42
            path=dirname,
43
            name=None,
44
            triggering_sources=sorted(filenames),
45
        )
46
        for dirname, filenames in group_by_dir(unowned_thrift_files).items()
47
    ]
48
    return PutativeTargets(pts)
×
49

50

UNCOV
51
def rules():
4✔
UNCOV
52
    return [
4✔
53
        *collect_rules(),
54
        UnionRule(PutativeTargetsRequest, PutativeThriftTargetsRequest),
55
    ]
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