def _execute_pep8(pep8_options, source):
 class QuietReport(pep8.BaseReport, ):
  u'Version of checker that does not print.'
  def __init__(self, options):
   super(QuietReport, self).__init__(options)
   self.__full_error_results = []
  def error(self, line_number, offset, text, check):
   u'Collect errors.'
   code = super(QuietReport, self).error(line_number, offset, text, check)
   if code:
    self.__full_error_results.append({u'id': code, u'line': line_number, u'column': (offset + 1), u'info': text})
  def full_error_results(self):
   u"Return error results in detail.\n\n            Results are in the form of a list of dictionaries. Each\n            dictionary contains 'id', 'line', 'column', and 'info'.\n\n            "
   return self.__full_error_results
 checker = pep8.Checker(u'', lines=source, reporter=QuietReport, **pep8_options)
 checker.check_all()
 return checker.report.full_error_results()

def _execute_pep8 ( pep8_options , source ) : class QuietReport ( pep8 . BaseReport , ) : def __init__ ( self , options ) : super ( QuietReport , self ) . __init__ ( options ) self . __full_error_results = [ ] def error ( self , line_number , offset , text , check ) : code = super ( QuietReport , self ) . error ( line_number , offset , text , check ) if code : self . __full_error_results . append ( { u'id' : code , u'line' : line_number , u'column' : ( offset + 1 ) , u'info' : text } ) def full_error_results ( self ) : return self . __full_error_results checker = pep8 . Checker ( u'' , lines = source , reporter = QuietReport , ** pep8_options ) checker . check_all ( ) return checker . report . full_error_results ( )
execute pep8 via python method calls .