(self)
| 1082 | if part not in target_state: |
| 1083 | raise InvalidDescendantError( |
| 1084 | f"Module '{target_module.path()}' state does not contain '{part}' from path " |
| 1085 | f"'{'.'.join(path_from_ancestor)}'. The state contains: {target_state.keys()}" |
| 1086 | ) |
| 1087 | target_module, target_state = target_module.children[part], target_state[part] |
| 1088 | |
| 1089 | return Module.SharedModuleInfo( |
| 1090 | module=target_module, state=target_state, name=shared_module_or_name |
| 1091 | ) |
| 1092 | |
| 1093 | def get_invocation_context(self) -> InvocationContext: # pytype: disable=invalid-annotation |
| 1094 | context = current_context() |
| 1095 | if not context: |
| 1096 | raise RuntimeError( |
| 1097 | "Module invocation context not found. " |
| 1098 | "Did you invoke the module inside functional(...)?" |
| 1099 | ) |
no test coverage detected