MCPcopy Create free account
hub / github.com/apify/crawlee-python / __sub__

Method __sub__

src/crawlee/_utils/byte_size.py:105–111  ·  view source on GitHub ↗
(self, other: object)

Source from the content-addressed store, hash-verified

103 return NotImplemented
104
105 def __sub__(self, other: object) -> ByteSize:
106 if isinstance(other, ByteSize):
107 result = self.bytes - other.bytes
108 if result < 0:
109 raise ValueError('Resulting ByteSize cannot be negative')
110 return ByteSize(result)
111 return NotImplemented
112
113 def __mul__(self, other: object) -> ByteSize:
114 if isinstance(other, (int, float)):

Callers

nothing calls this directly

Calls 1

ByteSizeClass · 0.85

Tested by

no test coverage detected