def cinder_one_import_per_line(logical_line):
 pos = logical_line.find(',')
 parts = logical_line.split()
 if ((pos > (-1)) and ((parts[0] == 'import') or ((parts[0] == 'from') and (parts[2] == 'import'))) and (not is_import_exception(parts[1]))):
  (yield (pos, 'CINDER N301: one import per line'))

def cinder_one_import_per_line ( logical_line ) : pos = logical_line . find ( ',' ) parts = logical_line . split ( ) if ( ( pos > ( - 1 ) ) and ( ( parts [ 0 ] == 'import' ) or ( ( parts [ 0 ] == 'from' ) and ( parts [ 2 ] == 'import' ) ) ) and ( not is_import_exception ( parts [ 1 ] ) ) ) : ( yield ( pos , 'CINDER N301: one import per line' ) )
check for import format .