• 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

100.0
/src/python/pants/bsp/util_rules/queries.py
1
# Copyright 2024 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
UNCOV
3
from __future__ import annotations
2✔
4

UNCOV
5
from collections.abc import Iterable
2✔
6

UNCOV
7
from pants.bsp.protocol import BSPHandlerMapping
2✔
UNCOV
8
from pants.engine.environment import EnvironmentName
2✔
UNCOV
9
from pants.engine.fs import Workspace
2✔
UNCOV
10
from pants.engine.rules import QueryRule, Rule
2✔
UNCOV
11
from pants.engine.unions import UnionRule
2✔
12

13

14
# Compute QueryRule's for each handler request/response pair.
15
# Note: These are necessary because the BSP support is an auxiliary goal that makes
16
# synchronous requests into the engine.
UNCOV
17
def compute_handler_query_rules(
2✔
18
    rules: Iterable[Rule | UnionRule | QueryRule],
19
) -> tuple[QueryRule, ...]:
UNCOV
20
    queries: list[QueryRule] = []
2✔
21

UNCOV
22
    for rule in rules:
2✔
UNCOV
23
        if isinstance(rule, UnionRule):
2✔
UNCOV
24
            if rule.union_base == BSPHandlerMapping:
2✔
UNCOV
25
                impl = rule.union_member
2✔
UNCOV
26
                assert issubclass(impl, BSPHandlerMapping)
2✔
UNCOV
27
                queries.append(
2✔
28
                    QueryRule(impl.response_type, (impl.request_type, Workspace, EnvironmentName))
29
                )
30

UNCOV
31
    return tuple(queries)
2✔
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