Ejemplo n.º 1
0
 def consume_file_path(
         number: int,
         number_1a_path: str,
         number_1b_file: str,
         number_1c_file_path: str,
         number_1d_path_file: str,
         number_2a_path: InputPath(str),
         number_2b_file: InputPath(str),
         number_2c_file_path: InputPath(str),
         number_2d_path_file: InputPath(str),
         number_3a_path: InputTextFile(str),
         number_3b_file: InputTextFile(str),
         number_3c_file_path: InputTextFile(str),
         number_3d_path_file: InputTextFile(str),
         number_4a_path: InputBinaryFile(str),
         number_4b_file: InputBinaryFile(str),
         number_4c_file_path: InputBinaryFile(str),
         number_4d_path_file: InputBinaryFile(str),
         output_number_2a_path: OutputPath(str),
         output_number_2b_file: OutputPath(str),
         output_number_2c_file_path: OutputPath(str),
         output_number_2d_path_file: OutputPath(str),
         output_number_3a_path: OutputTextFile(str),
         output_number_3b_file: OutputTextFile(str),
         output_number_3c_file_path: OutputTextFile(str),
         output_number_3d_path_file: OutputTextFile(str),
         output_number_4a_path: OutputBinaryFile(str),
         output_number_4b_file: OutputBinaryFile(str),
         output_number_4c_file_path: OutputBinaryFile(str),
         output_number_4d_path_file: OutputBinaryFile(str),
 ):
     pass
Ejemplo n.º 2
0
        def write_to_file_path(
            file_input1_path: InputPath(str),
            file_input2_file: InputTextFile(str),
            file_output1_path: OutputPath(str),
            file_output2_file: OutputTextFile(str),
            value_input1: str = 'foo',
            value_input2: str = 'foo',
        ) -> NamedTuple('Outputs', [
            ('return_output1', str),
            ('return_output2', str),
        ]):
            with open(file_input1_path, 'r') as file_input1_file:
                with open(file_output1_path, 'w') as file_output1_file:
                    file_output1_file.write(file_input1_file.read())

            file_output2_file.write(file_input2_file.read())

            return (value_input1, value_input2)
Ejemplo n.º 3
0
 def consume_file_path(number_file: InputTextFile(int)) -> int:
     string_data = number_file.read()
     assert isinstance(string_data, str)
     return int(string_data)