예제 #1
0
 def of_tcds(a: TcdsArrangement) -> 'TcdsArrangementPostAct':
     return TcdsArrangementPostAct(
         tcds_contents=a.tcds_contents,
         hds_contents=a.hds_contents,
         non_hds_contents=a.non_hds_contents,
         act_result=reduce_optional(lambda x: x, NULL_ACT_RESULT_PRODUCER,
                                    a.act_result),
         pre_population_action=a.pre_population_action,
         post_population_action=a.post_population_action,
     )
예제 #2
0
파일: impl.py 프로젝트: emilkarlen/exactly
    def main(
        self,
        environment: InstructionEnvironmentForPostSdsStep,
        settings: InstructionSettings,
        os_services: OsServices,
    ):
        def resolve(x: Optional[IntegerSdv]) -> Optional[int]:
            return x.resolve(environment.symbols).value_of_any_dependency(
                environment.tcds)

        value = functional.reduce_optional(resolve, None, self._value)

        settings.set_timeout(value)
예제 #3
0
파일: impl.py 프로젝트: emilkarlen/exactly
 def symbol_usages(self) -> Sequence[SymbolUsage]:
     return functional.reduce_optional(sdv_structure.get_references, (),
                                       self._value)
예제 #4
0
def _mk_tcds_arrangement_post_act(
        tcds: Optional[TcdsArrangement]) -> TcdsArrangementPostAct:
    return reduce_optional(TcdsArrangementPostAct.of_tcds,
                           _NEUTRAL_TCDS_POST_ACT, tcds)
예제 #5
0
def render_timeout_value(x: Optional[int]) -> str:
    return functional.reduce_optional(str, TIMEOUT__NONE_TOKEN, x)