MCPcopy Index your code
hub / github.com/tensorflow/datasets / _validate_operand

Method _validate_operand

tensorflow_datasets/core/utils/version.py:183–190  ·  view source on GitHub ↗
(self, other)

Source from the content-addressed store, hash-verified

181 return self.major, self.minor, self.patch
182
183 def _validate_operand(self, other):
184 if isinstance(other, str):
185 return Version(other)
186 elif isinstance(other, Version):
187 return other
188 raise AssertionError(
189 "{} (type {}) cannot be compared to version.".format(other, type(other))
190 )
191
192 def __eq__(self, other):
193 if other is None:

Callers 5

__eq__Method · 0.95
__lt__Method · 0.95
__le__Method · 0.95
__gt__Method · 0.95
__ge__Method · 0.95

Calls 1

VersionClass · 0.70

Tested by

no test coverage detected