def blank_lines(logical_line, blank_lines, indent_level, line_number, previous_logical, previous_indent_level):
 if ((line_number < 3) and (not previous_logical)):
  return
 if previous_logical.startswith('@'):
  if blank_lines:
   (yield (0, 'E304 blank lines found after function decorator'))
 elif ((blank_lines > 2) or (indent_level and (blank_lines == 2))):
  (yield (0, ('E303 too many blank lines (%d)' % blank_lines)))
 elif logical_line.startswith(('def ', 'class ', '@')):
  if indent_level:
   if (not (blank_lines or (previous_indent_level < indent_level) or DOCSTRING_REGEX.match(previous_logical))):
    (yield (0, 'E301 expected 1 blank line, found 0'))
  elif (blank_lines != 2):
   (yield (0, ('E302 expected 2 blank lines, found %d' % blank_lines)))

def blank_lines ( logical_line , blank_lines , indent_level , line_number , previous_logical , previous_indent_level ) : if ( ( line_number < 3 ) and ( not previous_logical ) ) : return if previous_logical . startswith ( '@' ) : if blank_lines : ( yield ( 0 , 'E304 blank lines found after function decorator' ) ) elif ( ( blank_lines > 2 ) or ( indent_level and ( blank_lines == 2 ) ) ) : ( yield ( 0 , ( 'E303 too many blank lines (%d)' % blank_lines ) ) ) elif logical_line . startswith ( ( 'def ' , 'class ' , '@' ) ) : if indent_level : if ( not ( blank_lines or ( previous_indent_level < indent_level ) or DOCSTRING_REGEX . match ( previous_logical ) ) ) : ( yield ( 0 , 'E301 expected 1 blank line, found 0' ) ) elif ( blank_lines != 2 ) : ( yield ( 0 , ( 'E302 expected 2 blank lines, found %d' % blank_lines ) ) )
separate top-level function and class definitions with two blank lines .