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

pantsbuild / pants / 19383812239

15 Nov 2025 03:34AM UTC coverage: 43.269% (-37.0%) from 80.284%
19383812239

Pull #22888

github

web-flow
Merge 2ffdbbb61 into cb4d9339a
Pull Request #22888: Bump the gha-deps group across 1 directory with 3 updates

25959 of 59995 relevant lines covered (43.27%)

0.87 hits per line

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

0.0
/src/python/pants/backend/build_files/fix/deprecations/base.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
×
5

6
import tokenize
×
7
from dataclasses import dataclass
×
8
from io import BytesIO
×
9

10
from pants.engine.internals.parser import ParseError
×
11

12

13
@dataclass(frozen=True)
×
14
class FixBUILDFileRequest:
×
15
    path: str
×
16
    content: bytes
×
17

18
    @property
×
19
    def lines(self) -> list[str]:
×
20
        return self.content.decode("utf-8").splitlines(keepends=True)
×
21

22
    def tokenize(self) -> list[tokenize.TokenInfo]:
×
23
        try:
×
24
            return list(tokenize.tokenize(BytesIO(self.content).readline))
×
25
        except tokenize.TokenError as e:
×
26
            raise ParseError(f"Failed to parse {self.path}: {e}")
×
27

28

29
@dataclass(frozen=True)
×
30
class FixedBUILDFile:
×
31
    path: str
×
32
    content: bytes
×
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