Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def read_boolean(self):
self._parser.advance(Boolean())
return self.read_value()
elif record_type == "array":
repeat = Repeater(
ArrayEnd(),
ItemEnd(),
self._parse(schema["items"]),
)
return Sequence(repeat, ArrayStart())
elif record_type == "enum":
return Sequence(EnumLabels(schema["symbols"]), Enum())
elif record_type == "null":
return Null()
elif record_type == "boolean":
return Boolean()
elif record_type == "string":
return String()
elif record_type == "bytes":
return Bytes()
elif record_type == "int":
return Int()
elif record_type == "long":
return Long()
elif record_type == "float":
return Float()
elif record_type == "double":
return Double()
elif record_type == "fixed":
return Fixed()
else:
raise Exception("Unhandled type: {}".format(record_type))
def write_boolean(self, value):
self._parser.advance(Boolean())
self.write_value(value)