def _get_changed_filenames():
 unstaged_files = subprocess.check_output(['git', 'diff', '--name-only']).splitlines()
 staged_files = subprocess.check_output(['git', 'diff', '--cached', '--name-only', '--diff-filter=ACM']).splitlines()
 return (unstaged_files + staged_files)

def _get_changed_filenames ( ) : unstaged_files = subprocess . check_output ( [ 'git' , 'diff' , '--name-only' ] ) . splitlines ( ) staged_files = subprocess . check_output ( [ 'git' , 'diff' , '--cached' , '--name-only' , '--diff-filter=ACM' ] ) . splitlines ( ) return ( unstaged_files + staged_files )
returns a list of modified files returns: a list of filenames of modified files .