#NEWLINE# def fix_pin_data( pin_data , part_num ) : #NEWLINE# #INDENT# 'Fix common errors in pin data.' #NEWLINE# fixed_pin_data = pin_data . strip ( ) #NEWLINE# if ( re . search ( '\\s' , pin_data ) is not None ) : #NEWLINE# #INDENT# fixed_pin_data = re . sub ( '\\s' , '_' , fixed_pin_data ) #NEWLINE# issue ( "Replaced whitespace with '_' in pin '{pin_data}' of part {part_num}." . format ( ** locals ( ) ) ) #NEWLINE# #UNINDENT# return fixed_pin_data