• 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

90.91
/src/python/pants/core/environments/subsystems.py
1
# Copyright 2022 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
3

4
from __future__ import annotations
1✔
5

6
from pants.option.global_options import GlobalOptions
1✔
7
from pants.option.option_types import DictOption
1✔
8
from pants.option.subsystem import Subsystem
1✔
9
from pants.util.strutil import help_text, softwrap
1✔
10

11

12
class EnvironmentsSubsystem(Subsystem):
1✔
13
    options_scope = "environments-preview"
1✔
14
    help = help_text(
1✔
15
        """
16
        A highly experimental subsystem to allow setting environment variables and executable
17
        search paths for different environments, e.g. macOS vs. Linux.
18
        """
19
    )
20

21
    names = DictOption[str](
1✔
22
        help=softwrap(
23
            """
24
            A mapping of logical names to addresses to environment targets. For example:
25

26
                [environments-preview.names]
27
                linux_local = "//:linux_env"
28
                macos_local = "//:macos_env"
29
                centos6 = "//:centos6_docker_env"
30
                linux_ci = "build-support:linux_ci_env"
31
                macos_ci = "build-support:macos_ci_env"
32

33
            To use an environment for a given target, specify the name in the `environment` field
34
            on that target. Pants will consume the environment target at the address mapped from
35
            that name.
36

37
            Pants will ignore any environment targets that are not given a name via this option.
38
            """
39
        )
40
    )
41

42
    def remote_execution_used_globally(self, global_options: GlobalOptions) -> bool:
1✔
43
        """If the environments mechanism is not used, `--remote-execution` toggles remote execution
44
        globally."""
UNCOV
45
        return not self.names and global_options.remote_execution
×
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