from pathlib import Path


def guess_language(filename):
    # pylint: disable=no-else-return
    """Guess language from suffix of the script."""
    suffix = Path(filename).suffix
    if suffix in [".sh", ".bash"]:
        return "bash"
    elif suffix == ".py":
        return "python"
    else:
        raise ValueError("Cannot guess language from {}".format(filename))