Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@ObjectMapper.constructor_arg('date_of_birth')
def dateconversion(self, builder, manager):
dob_builder = builder.get('date_of_birth')
if dob_builder is None:
return
else:
datestr = dob_builder.data
date = dateutil_parse(datestr)
return date
@ObjectMapper.constructor_arg('scratch')
def scratch(self, builder, manager):
scratch = builder.get('scratch')
ret = list()
if scratch is not None:
for g in scratch.groups.values():
ret.append(manager.construct(g))
for d in scratch.datasets.values():
ret.append(manager.construct(d))
return tuple(ret) if len(ret) > 0 else None
@ObjectMapper.constructor_arg('name')
def carg_name(self, builder, manager):
return builder.name
@ObjectMapper.constructor_arg('data')
def carg_data(self, builder, manager):
return builder.data
@ObjectMapper.constructor_arg('file_create_date')
def dateconversion_list(self, builder, manager):
datestr = builder.get('file_create_date').data
dates = list(map(dateutil_parse, datestr))
return dates
@ObjectMapper.constructor_arg('timestamps_reference_time')
def dateconversion_trt(self, builder, manager):
datestr = builder.get('timestamps_reference_time').data
date = dateutil_parse(datestr)
return date
@ObjectMapper.constructor_arg('session_start_time')
def dateconversion(self, builder, manager):
datestr = builder.get('session_start_time').data
date = dateutil_parse(datestr)
return date