MCPcopy Index your code
hub / github.com/archlinux/archinstall / _normalize

Method _normalize

archinstall/lib/models/device.py:467–473  ·  view source on GitHub ↗

will normalize the value of the unit to Byte

(self)

Source from the content-addressed store, hash-verified

465 return self - Size(1, Unit.MiB, self.sector_size)
466
467 def _normalize(self) -> int:
468 """
469 will normalize the value of the unit to Byte
470 """
471 if self.unit == Unit.sectors and self.sector_size is not None:
472 return self.value * self.sector_size.normalize()
473 return int(self.value * self.unit.value)
474
475 def __sub__(self, other: Self) -> Size:
476 src_norm = self._normalize()

Callers 11

convertMethod · 0.95
binary_unit_highestMethod · 0.95
alignMethod · 0.95
__sub__Method · 0.95
__add__Method · 0.95
__lt__Method · 0.95
__le__Method · 0.95
__eq__Method · 0.95
__ne__Method · 0.95
__gt__Method · 0.95
__ge__Method · 0.95

Calls 1

normalizeMethod · 0.80

Tested by

no test coverage detected