• 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

94.74
/src/python/pants/backend/python/subsystems/debugpy.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
12✔
5

6
from pants.backend.python.subsystems.python_tool_base import PythonToolBase
12✔
7
from pants.backend.python.target_types import EntryPoint
12✔
8
from pants.core.subsystems.debug_adapter import DebugAdapterSubsystem
12✔
9
from pants.engine.rules import collect_rules
12✔
10
from pants.option.option_types import ArgsListOption
12✔
11

12

13
class DebugPy(PythonToolBase):
12✔
14
    options_scope = "debugpy"
12✔
15
    name = options_scope
12✔
16
    help_short = "An implementation of the Debug Adapter Protocol for Python (https://github.com/microsoft/debugpy)."
12✔
17

18
    default_main = EntryPoint("debugpy")
12✔
19
    default_requirements = ["debugpy>=1.6.5,<1.7"]
12✔
20

21
    register_interpreter_constraints = True
12✔
22

23
    default_lockfile_resource = ("pants.backend.python.subsystems", "debugpy.lock")
12✔
24

25
    args = ArgsListOption(example="--log-to-stderr")
12✔
26

27
    # NB: The debugpy arguments assume that:
28
    #   1. debugpy is being invoked in a venv (likely we're in a VenvPex)
29
    #   2. debugpy is in the same venv as the user code
30
    def get_args(self, debug_adapter: DebugAdapterSubsystem) -> tuple[str, ...]:
12✔
31
        return (
×
32
            "--listen",
33
            f"{debug_adapter.host}:{debug_adapter.port}",
34
            "--wait-for-client",
35
            *self.args,
36
            "-c",
37
            "__import__('runpy').run_path(__import__('os').environ['VIRTUAL_ENV'] + '/pex', run_name='__main__')",
38
        )
39

40

41
def rules():
12✔
UNCOV
42
    return collect_rules()
4✔
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