def _strip_line(s: str) -> str:
    """
    Strip whitespace and a possible trailing slash at the end of line.
    """
    s = s.strip()
    if s.startswith("#"):
        return ""
    if s.endswith("\\"):
        s = s[:-1].rstrip()
    return s