from typing import List
from pathlib import Path


def textfile_to_list(filename: str) -> List[str]:
    """Reads a text file and returns a list of its non-empty lines.

    Args:
        filename: name of the text file

    Returns:
        list of the non-empty lines.
    """
    returned_list = []
    with Path(filename).open() as fhandle:
        for line in fhandle:
            if line.strip():
                returned_list.append(line.strip())
    return returned_list