from pathlib import Path
from typing import List
from typing import Set


def special_characters(INPUT_FOLDER: Path) -> List[str]:
    """Returns a list of special characters used in all files in a directory.
    
    A special character is all that has a Unicode greater than 127.
    This function is used only once to manually build the replacement dictionary.
    
    Parameters:
    INPUT_FOLDER: Path - Path object with directory where to read all files
    
    Returns:
    A list with all special characters
    """
    assert INPUT_FOLDER.exists(), f"Path: {INPUT_FOLDER} does not exist"
    chars: Set[str] = set()  # where to store all different characters
    for file in INPUT_FOLDER.iterdir():
        with file.open("r") as f:
            text = f.read()
        chars = chars.union(set(text))
    return list(filter(lambda char: True if ord(char) > 127 else False, chars))