def read_from_file(filepath: str) -> list:
    """Read from file.

    Reads lines from text file and returns a :py:obj:`list`.

    Args:
        filepath (str): Path to file with names.

    Returns:
        List with each line from the file as an element.

    Note:
        Removes trailing whitespaces.

    """
    # Read lines from file and remove trailing whitespaces.
    with open(filepath, 'r') as file:
        file_data = [line.rstrip() for line in file]
    return file_data