def apply_format_string(fields: dict) -> str: args = get_args() fields = prepare_fields(fields) name = tmep.parse(args.rename_format, fields) return name
def set_field(self, destination_field, format_string): field_value = tmep.parse(format_string, self.interface.export_to_dict()) setattr(self.interface, destination_field, field_value)
def write_to_log_file(self, log_file, format_string): log = open(log_file, 'w') log.write( tmep.parse(format_string, self.interface.export_to_dict()) + '\n') log.close()
def write_to_log_file(self, log_file, format_string): log = open(log_file, 'w') log.write(tmep.parse(format_string, self.interface.export_to_dict()) + '\n') log.close()
def parseEqual(self, a, b): self.assertEqual(tmep.parse(a, self.values), b)