def _check_duplicated_arguments(self): from dvc.exceptions import ArgumentDuplicationError from collections import Counter count = Counter(file.path for file in self.deps + self.outs) for file, occurrence in count.items(): if occurrence > 1: raise ArgumentDuplicationError(file)
def _check_duplicated_arguments(self): from dvc.exceptions import ArgumentDuplicationError from collections import Counter path_counts = Counter(edge.path_info for edge in self.deps + self.outs) for path, occurrence in path_counts.items(): if occurrence > 1: raise ArgumentDuplicationError(str(path))
def check_duplicated_arguments(stage): from collections import Counter from dvc.exceptions import ArgumentDuplicationError path_counts = Counter(edge.fs_path for edge in stage.deps + stage.outs) for path, occurrence in path_counts.items(): if occurrence > 1: raise ArgumentDuplicationError(str(path))