import pathlib


def unique_directories(files):
    """Returns a list of directories (pathlib.Path objects) for the files
    passed without repetitions."""
    return list({pathlib.Path(x).parent for x in files})