def nova_import_alphabetical(logical_line, blank_lines, previous_logical, indent_level, previous_indent_level):
 split_line = import_normalize(logical_line.strip()).lower().split()
 split_previous = import_normalize(previous_logical.strip()).lower().split()
 if ((blank_lines < 1) and (indent_level == previous_indent_level)):
  length = [2, 4]
  if ((len(split_line) in length) and (len(split_previous) in length) and (split_line[0] == 'import') and (split_previous[0] == 'import')):
   if (split_line[1] < split_previous[1]):
    (yield (0, ('N306: imports not in alphabetical order (%s, %s)' % (split_previous[1], split_line[1]))))

def nova_import_alphabetical ( logical_line , blank_lines , previous_logical , indent_level , previous_indent_level ) : split_line = import_normalize ( logical_line . strip ( ) ) . lower ( ) . split ( ) split_previous = import_normalize ( previous_logical . strip ( ) ) . lower ( ) . split ( ) if ( ( blank_lines < 1 ) and ( indent_level == previous_indent_level ) ) : length = [ 2 , 4 ] if ( ( len ( split_line ) in length ) and ( len ( split_previous ) in length ) and ( split_line [ 0 ] == 'import' ) and ( split_previous [ 0 ] == 'import' ) ) : if ( split_line [ 1 ] < split_previous [ 1 ] ) : ( yield ( 0 , ( 'N306: imports not in alphabetical order (%s, %s)' % ( split_previous [ 1 ] , split_line [ 1 ] ) ) ) )
check for imports in alphabetical order .