• 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/tools/taplo/subsystem.py
1
# Copyright 2023 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
UNCOV
3
from __future__ import annotations
×
4

UNCOV
5
from pathlib import PurePosixPath
×
6

UNCOV
7
from pants.core.util_rules.config_files import ConfigFilesRequest
×
UNCOV
8
from pants.core.util_rules.external_tool import TemplatedExternalTool
×
UNCOV
9
from pants.engine.platform import Platform
×
UNCOV
10
from pants.option.option_types import ArgsListOption, BoolOption, SkipOption, StrListOption
×
UNCOV
11
from pants.util.strutil import softwrap
×
12

13

UNCOV
14
class Taplo(TemplatedExternalTool):
×
UNCOV
15
    help = "An autoformatter for TOML files (https://taplo.tamasfe.dev/)"
×
16

UNCOV
17
    options_scope = "taplo"
×
UNCOV
18
    name = "Taplo"
×
UNCOV
19
    default_version = "0.9.3"
×
UNCOV
20
    default_known_versions = [
×
21
        "0.9.3|macos_x86_64|6b4180fe0518e3e68b9a421dbe50f62ede308767972c4c70c6bbe6651ea98641|4243525",
22
        "0.9.3|macos_arm64|39b84d62d6a47855b2c64148cde9c9ca5721bf422b8c9fe9c92776860badde5f|4039644",
23
        "0.9.3|linux_x86_64|889efcfa067b179fda488427d3b13ce2d679537da8b9ed8138ba415db7da2a5e|4477376",
24
        "0.9.3|linux_arm64|7c07379d3288fb5c26b1c29bbedec4f8d8f602d776bcc3a1578176733b6a857c|4393144",
25
        "0.8.0|macos_x86_64|a1917f1b9168cb4f7d579422dcdf9c733028d873963d8fa3a6f499e41719c502|3926263",
26
        "0.8.0|macos_arm64|79c1691c3c46be981fa0cec930ec9a6d6c4ffd27272d37d1885514ce59bd8ccf|3661689",
27
        "0.8.0|linux_x86_64|3703294fac37ca9a9f76308f9f98c3939ccb7588f8972acec68a48d7a10d8ee5|4123593",
28
        "0.8.0|linux_arm64|a6a94482f125c21090593f94cad23df099c4924f5b9620cda4a8653527c097a1|3995383",
29
    ]
UNCOV
30
    default_url_template = (
×
31
        "https://github.com/tamasfe/taplo/releases/download/{version}/taplo-{platform}.gz"
32
    )
UNCOV
33
    default_url_platform_mapping = {
×
34
        "macos_arm64": "darwin-aarch64",
35
        "macos_x86_64": "darwin-x86_64",
36
        "linux_arm64": "linux-aarch64",
37
        "linux_x86_64": "linux-x86_64",
38
    }
39

UNCOV
40
    skip = SkipOption("fmt", "lint")
×
UNCOV
41
    args = ArgsListOption(example="--option=align_entries=false")
×
UNCOV
42
    config_discovery = BoolOption(
×
43
        default=True,
44
        advanced=True,
45
        help=softwrap(
46
            """
47
            If true, Pants will include a `taplo.toml` or `.taplo.toml` file found in
48
            the build root during a run.
49
            """
50
        ),
51
    )
52

UNCOV
53
    glob_pattern = StrListOption(
×
54
        help=softwrap(
55
            """
56
            A list of glob patterns of files to include/exclude in formatting relative
57
            to the build root. Leading exclamation points exclude an item from
58
            formatting.
59

60
            Example:
61

62
                ["**/*.toml", "**/pyproject.toml", "!pyproject.toml"]
63

64
            The default includes all files with a `.toml` extension recursively and excludes
65
            `.taplo.toml` or `taplo.toml` files in the build root.
66
            """
67
        ),
68
        advanced=True,
69
        default=["**/*.toml", "!.taplo.toml", "!taplo.toml"],
70
    )
71

UNCOV
72
    def generate_exe(self, plat: Platform) -> str:
×
73
        exe = super().generate_exe(plat)
×
74
        return PurePosixPath(exe).stem
×
75

UNCOV
76
    def config_request(self) -> ConfigFilesRequest:
×
77
        return ConfigFilesRequest(
×
78
            discovery=self.config_discovery,
79
            check_existence=[".taplo.toml", "taplo.toml"],
80
        )
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