from typing import Union
from typing import List


def list_from_env(env_value: Union[List[str], str]) -> List[str]:
    """Convert environment variable to list."""
    if isinstance(env_value, str):
        env_value = [u for u in env_value.split(',') if u]
    return env_value