• 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

63.64
/src/python/pants/backend/codegen/thrift/apache/subsystem.py
1
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
UNCOV
3
from __future__ import annotations
2✔
4

UNCOV
5
import os
2✔
6

UNCOV
7
from pants.engine.env_vars import EnvironmentVars
2✔
UNCOV
8
from pants.option.option_types import StrListOption, StrOption
2✔
UNCOV
9
from pants.option.subsystem import Subsystem
2✔
UNCOV
10
from pants.util.ordered_set import OrderedSet
2✔
UNCOV
11
from pants.util.strutil import softwrap
2✔
12

13

UNCOV
14
class ApacheThriftSubsystem(Subsystem):
2✔
UNCOV
15
    options_scope = "apache-thrift"
2✔
UNCOV
16
    help = "Apache Thrift IDL compiler (https://thrift.apache.org/)."
2✔
17

UNCOV
18
    expected_version = StrOption(
2✔
19
        default="0.15",
20
        help=softwrap(
21
            """
22
            The major/minor version of Apache Thrift that  you are using, such as `0.15`.
23

24
            Pants will only use Thrift binaries from `--thrift-search-paths` that have the
25
            expected version, and it will error if none are found.
26

27
            Do not include the patch version.
28
            """
29
        ),
30
    )
31

UNCOV
32
    class EnvironmentAware:
2✔
UNCOV
33
        _thrift_search_paths = StrListOption(
2✔
34
            default=["<PATH>"],
35
            help=softwrap(
36
                """
37
                A list of paths to search for Thrift.
38

39
                Specify absolute paths to directories with the `thrift` binary, e.g. `/usr/bin`.
40
                Earlier entries will be searched first.
41

42
                The special string `"<PATH>"` will expand to the contents of the PATH env var.
43
                """
44
            ),
45
        )
46

UNCOV
47
        def thrift_search_paths(self, env: EnvironmentVars) -> tuple[str, ...]:
2✔
48
            def iter_path_entries():
×
49
                for entry in self._thrift_search_paths:
×
50
                    if entry == "<PATH>":
×
51
                        path = env.get("PATH")
×
52
                        if path:
×
53
                            yield from path.split(os.pathsep)
×
54
                    else:
55
                        yield entry
×
56

57
            return tuple(OrderedSet(iter_path_entries()))
×
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