Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _load_context_next_states(
path: Path,
yaml_next_states: Yaml,
feed_names: List[str],
) -> NextStates:
context_path = yaml_next_states['path']
_validate_context_lookups(path + ['path'], (context_path,), feed_names)
return ContextNextStates(
path=context_path,
destinations=[
_load_context_next_state_option(
path + ['destinations', str(idx)],
yaml_option,
)
for idx, yaml_option in enumerate(yaml_next_states['destinations'])
],
default=yaml_next_states['default'],
)