(self, read_context)
| 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 | |
| 477 | class EnumSerializer(Serializer): |
nothing calls this directly
no test coverage detected