MCPcopy Create free account
hub / github.com/FelixSchwarz/mjml-python / WidthUnit

Class WidthUnit

mjml/helpers/width_parser.py:10–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8
9
10class WidthUnit(NamedTuple):
11 width: Union[int, float]
12 unit: str = "px"
13
14 @property
15 def parsedWidth(self) -> Union[int, float]:
16 return self.width
17
18 def __str__(self) -> str:
19 return f'{self.width}{self.unit}'
20
21
22unitRegex = re.compile(r'[\d.,]*(\D*)$')

Callers 1

widthParserFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected