

def get_touched_payload_files(payload):
    ' Return a set of files modified in payload commits.\n    '
    touched = set()
    for commit in payload['commits']:
        for filelist in (commit['added'], commit['modified']):
            touched.update(filelist)
        for filename in commit['removed']:
            if (filename in touched):
                touched.remove(filename)
    current_app.logger.debug('Touched files {}'.format(', '.join(touched)))
    return touched

dataset/ETHPy150Open openaddresses/machine/openaddr/ci/__init__.py get_touched_payload_files/original