#NEWLINE# def _pep8( files ) : #NEWLINE# #INDENT# '\n    Validates a list of files for PEP8 compliance.\n    ' #NEWLINE# result = [ ] #NEWLINE# with cd ( os . path . dirname ( __file__ ) ) : #NEWLINE# #INDENT# for f in files : #NEWLINE# #INDENT# if f . endswith ( '.py' ) : #NEWLINE# #INDENT# out = local ( ( 'pep8 %s' % f ) ) #NEWLINE# if files : #NEWLINE# #INDENT# result . append ( out ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# if result : #NEWLINE# #INDENT# print ( '' . join ( result ) . rstrip ( ) ) #NEWLINE# abort ( 'Staged files did not pass PEP8 validation.' )