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

Hekxsler / pudding / 20777776429

07 Jan 2026 09:22AM UTC coverage: 88.574% (+0.3%) from 88.305%
20777776429

Pull #1

github

web-flow
[tests]: add coverage for out.replace
Pull Request #1: Increase performance with custom node class

1155 of 1304 relevant lines covered (88.57%)

0.89 hits per line

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

80.0
pudding/datatypes/data.py
1
"""Base class for data types."""
2

3
import re
1✔
4

5

6
class Data:
1✔
7
    """Class representing a data value.
8

9
    :var regex: Regex matching the data type as a string.
10
    """
11

12
    regex: str
13

14
    def __init__(self, line: int, value: str) -> None:
1✔
15
        """Init for Data class.
16

17
        :param line: Line number of this data.
18
        :param value: Value of the data object.
19
        """
20
        if not re.fullmatch(self.regex, value):
1✔
21
            raise TypeError(f"Value is not of type {self.__class__.__name__}")
×
22
        self.line = line
1✔
23
        self.value = value
1✔
24
        self.re_pattern = re.escape(self.value)
1✔
25

26
    def __str__(self) -> str:
1✔
27
        """Value as a string."""
28
        return self.value
×
29

30
    def __repr__(self) -> str:
31
        """Return string representation of this object."""
32
        return f"<{self.__class__.__name__} value={repr(self.value)}>"
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