def _get_files(only_py=False):
 for (dirpath, _dirnames, filenames) in os.walk('.'):
  parts = dirpath.split(os.sep)
  if (len(parts) >= 2):
   rootdir = parts[1]
   if (rootdir.startswith('.') or (rootdir == 'htmlcov')):
    continue
  if only_py:
   endings = {'.py'}
  else:
   endings = {'.py', '.asciidoc', '.js', '.feature'}
  files = (e for e in filenames if (os.path.splitext(e)[1] in endings))
  for name in files:
   (yield os.path.join(dirpath, name))

def _get_files ( only_py = False ) : for ( dirpath , _dirnames , filenames ) in os . walk ( '.' ) : parts = dirpath . split ( os . sep ) if ( len ( parts ) >= 2 ) : rootdir = parts [ 1 ] if ( rootdir . startswith ( '.' ) or ( rootdir == 'htmlcov' ) ) : continue if only_py : endings = { '.py' } else : endings = { '.py' , '.asciidoc' , '.js' , '.feature' } files = ( e for e in filenames if ( os . path . splitext ( e ) [ 1 ] in endings ) ) for name in files : ( yield os . path . join ( dirpath , name ) )
iterate over all python files and yield filenames .