from typing import Callable from typing import Optional from typing import Tuple import flask def url_for(value: str, filename: Optional[str] = None) -> str: """Wrapper around :func:`flask.url_for` to expose the functionality in a template""" if filename: return flask.url_for(value, filename=filename) return flask.url_for(value) FILTERS: Tuple[Callable, ...] = (url_for,)