def dedupe()

in choose_ci_set.py [0:0]


def dedupe(run_list: list, slash: str) -> list:
    """For a run list, remove entries that are covered by more general entries."""
    run_list = list(set(run_list))
    dotslashes = []
    removes = []

    for i, entry in enumerate(run_list):
        if (
            not entry.startswith(".")
            and not entry.startswith("\\")
            and not entry.startswith("/")
        ):
            dotslashes.append(i)

    for dotslash in dotslashes:
        run_list[dotslash] = f".{slash}{run_list[dotslash]}"

    for i, entry_a in enumerate(run_list):
        for j, entry_b in enumerate(run_list):
            if i == j:
                continue
            candidate = max((i, j))
            if entry_a in entry_b and candidate not in removes:
                removes.append(candidate)

    removes.sort(reverse=True)
    for remove in removes:
        del run_list[remove]

    return run_list