• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 24457923341

15 Apr 2026 01:42PM UTC coverage: 75.08% (-5.2%) from 80.27%
24457923341

push

github

web-flow
upgrade to Trivy v0.69.2 (Cherry-pick of #23155) (#23258)

Update to Trivy v0.69.2. Prior releases were deleted as part of [an
attack they
suffered](https://github.com/aquasecurity/trivy/discussions/10265), so
our CI is broken while it is still references the prior version.

Co-authored-by: Tom Dyas <tom.dyas@gmail.com>

1 of 1 new or added line in 1 file covered. (100.0%)

2174 existing lines in 88 files now uncovered.

6128 of 8162 relevant lines covered (75.08%)

33.63 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

93.33
/src/python/pants/util/docutil.py
1
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
3

4

5
from __future__ import annotations
10✔
6

7
import shutil
10✔
8

9
from pants.engine.internals.native_engine import py_bin_name
10✔
10
from pants.version import MAJOR_MINOR, PANTS_SEMVER
10✔
11

12

13
# NB: This is not memoized because that would cause Pants to not pick up terminal resizing when
14
# using pantsd.
15
def terminal_width(*, fallback: int = 96, padding: int = 2) -> int:
10✔
UNCOV
16
    return shutil.get_terminal_size(fallback=(fallback, 24)).columns - padding
×
17

18

19
_VERSIONED_PREFIXES = ("docs/", "reference/")
10✔
20

21

22
def doc_url(path: str) -> str:
10✔
23
    """Return a URL to the specified `path` on the Pants website.
24

25
    The path should be the part of the URL after the domain, ignoring the version, e.g.:
26

27
    - to link to https://www.pantsbuild.org/community/getting-help, pass `"/community/getting-help"`
28

29
    - to link to the current version of
30
      https://www.pantsbuild.org/2.19/docs/python/overview/enabling-python-support, pass
31
      `"docs/python/overview/enabling-python-support"`
32
    """
33
    versioned = any(path.startswith(prefix) for prefix in _VERSIONED_PREFIXES)
10✔
34
    version_info = f"{MAJOR_MINOR}/" if versioned else ""
10✔
35
    return f"https://www.pantsbuild.org/{version_info}{path}"
10✔
36

37

38
def git_url(fp: str) -> str:
10✔
39
    """Link to code in pantsbuild/pants."""
40
    return f"https://github.com/pantsbuild/pants/blob/release_{PANTS_SEMVER}/{fp}"
10✔
41

42

43
def bin_name() -> str:
10✔
44
    """Return the Pants binary name, e.g. 'pants'.
45

46
    Can be configured with the pants_bin_name option.
47
    """
48
    return py_bin_name()
10✔
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