def extended_blank_lines(logical_line, blank_lines, blank_before, indent_level, previous_logical):
 if previous_logical.startswith(u'class '):
  if logical_line.startswith((u'def ', u'class ', u'@')):
   if (indent_level and (not blank_lines) and (not blank_before)):
    (yield (0, u'E309 expected 1 blank line after class declaration'))
 elif previous_logical.startswith(u'def '):
  if (blank_lines and pep8.DOCSTRING_REGEX.match(logical_line)):
   (yield (0, u'E303 too many blank lines ({0})'.format(blank_lines)))
 elif pep8.DOCSTRING_REGEX.match(previous_logical):
  if (indent_level and (not blank_lines) and (not blank_before) and logical_line.startswith(u'def ') and (u'(self' in logical_line)):
   (yield (0, u'E301 expected 1 blank line, found 0'))

def extended_blank_lines ( logical_line , blank_lines , blank_before , indent_level , previous_logical ) : if previous_logical . startswith ( u'class ' ) : if logical_line . startswith ( ( u'def ' , u'class ' , u'@' ) ) : if ( indent_level and ( not blank_lines ) and ( not blank_before ) ) : ( yield ( 0 , u'E309 expected 1 blank line after class declaration' ) ) elif previous_logical . startswith ( u'def ' ) : if ( blank_lines and pep8 . DOCSTRING_REGEX . match ( logical_line ) ) : ( yield ( 0 , u'E303 too many blank lines ({0})' . format ( blank_lines ) ) ) elif pep8 . DOCSTRING_REGEX . match ( previous_logical ) : if ( indent_level and ( not blank_lines ) and ( not blank_before ) and logical_line . startswith ( u'def ' ) and ( u'(self' in logical_line ) ) : ( yield ( 0 , u'E301 expected 1 blank line, found 0' ) )
check for missing blank lines after class declaration .