def path_filter(path):
    # type: (str) -> str
    """
    Removes the trailing '/' of a path, if any

    :param path: A parsed path
    :return: The parsed path without its trailing /
    """
    return path[:-1] if path and path[-1] == "/" else path