@cmd
def flake8():
 py_files = subprocess.check_output('git ls-files')
 if PY3:
  py_files = py_files.decode()
 py_files = [x for x in py_files.split() if x.endswith('.py')]
 py_files = ' '.join(py_files)
 sh(('%s -m flake8 %s' % (PYTHON, py_files)))

@ cmd def flake8 ( ) : py_files = subprocess . check_output ( 'git ls-files' ) if PY3 : py_files = py_files . decode ( ) py_files = [ x for x in py_files . split ( ) if x . endswith ( '.py' ) ] py_files = ' ' . join ( py_files ) sh ( ( '%s -m flake8 %s' % ( PYTHON , py_files ) ) )
run flake8 against all py files .