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

pantsbuild / pants / 23177125175

17 Mar 2026 03:32AM UTC coverage: 52.677% (-40.3%) from 92.932%
23177125175

Pull #23177

github

web-flow
Merge 1824dfbf4 into 0b9fdfb0e
Pull Request #23177: Bump the gha-deps group across 1 directory with 4 updates

31687 of 60153 relevant lines covered (52.68%)

1.05 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