will normalize the value of the unit to Byte
(self)
| 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() |