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

pantsbuild / pants / 23173035367

17 Mar 2026 12:47AM UTC coverage: 91.371% (-1.6%) from 92.933%
23173035367

push

github

web-flow
update helm (and friends) to a recent 3.x seies (#23143)

v4 is a major breaking change, so holding off on that. (There was also
just a 3.20, but 3.19 has this reassuring series of bug fixes and was
also quite recent.)

2 of 2 new or added lines in 2 files covered. (100.0%)

1263 existing lines in 73 files now uncovered.

86196 of 94336 relevant lines covered (91.37%)

3.87 hits per line

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

83.33
/src/python/pants/util/requirements.py
1
# Copyright 2023 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
3
from collections.abc import Iterator
11✔
4

5
from pants.util.pip_requirement import PipRequirement
11✔
6

7

8
def parse_requirements_file(content: str, *, rel_path: str) -> Iterator[PipRequirement]:
11✔
9
    """Parse all `PipRequirement` objects from a requirements.txt-style file.
10

11
    This will safely ignore any options starting with `--` and will ignore comments. Any pip-style
12
    VCS requirements will fail, with a helpful error message describing how to use PEP 440.
13
    """
14
    for i, line in enumerate(content.splitlines(), start=1):
6✔
15
        line, _, _ = line.partition("--")
6✔
16
        line = line.strip().rstrip("\\")
6✔
17
        if not line or line.startswith(("#", "-")):
6✔
UNCOV
18
            continue
×
19

20
        # Strip comments which are otherwise on a valid requirement line.
21
        comment_pos = line.find("#")
6✔
22
        if comment_pos != -1:
6✔
UNCOV
23
            line = line[0:comment_pos].strip()
×
24

25
        yield PipRequirement.parse(line, description_of_origin=f"{rel_path} at line {i}")
6✔
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