Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def install(ctx):
recorder = Recorder()
def cb_fn(class_fn, so, *args):
dat = recorder.get(so)
time = pysurvive.survive_run_time(so.contents.ctx)
return class_fn(dat, time, *args)
pysurvive.install_angle_fn(ctx, partial(cb_fn, RecordedData.record_angle))
pysurvive.install_light_fn(ctx, partial(cb_fn, RecordedData.record_light))
pysurvive.install_imu_fn(ctx, partial(cb_fn, RecordedData.record_imu))
pysurvive.install_pose_fn(ctx, partial(cb_fn, RecordedData.record_pose))
pysurvive.install_sweep_fn(ctx, partial(cb_fn, RecordedData.record_sweep))
pysurvive.install_sync_fn(ctx, partial(cb_fn, RecordedData.record_sync))
pysurvive.install_sweep_angle_fn(ctx, partial(cb_fn, RecordedData.record_sweep_angle))
return recorder