@staticmethod
def _get_targets(*, context, previous_rcs):
    """Get targets for the tool."""
    targets_used = []
    for path, return_code in list(previous_rcs.items()):
        if return_code != 0:
            targets_used.append(path)
    if '{affected_targets}' in context['config']:
        targets_used += context['affected files']
    return list(set(targets_used))
