MCPcopy Create free account
hub / github.com/apache/fory / read

Method read

python/pyfory/_serializer.py:469–474  ·  view source on GitHub ↗
(self, read_context)

Source from the content-addressed store, hash-verified

467 write_context.write_int32(micros * 1000)
468
469 def read(self, read_context):
470 seconds = read_context.read_varint64()
471 nanos = read_context.read_int32()
472 if nanos < 0 or nanos > 999_999_999:
473 raise ValueError(f"Duration nanoseconds {nanos} out of valid range [0, 999999999]")
474 return datetime.timedelta(seconds=seconds, microseconds=nanos // 1000)
475
476
477class EnumSerializer(Serializer):

Callers

nothing calls this directly

Calls 2

read_varint64Method · 0.80
read_int32Method · 0.45

Tested by

no test coverage detected