Exemple #1
0
def get_all_filters():
    """
    Return a generator of all filter names.
    """
    for name in FILTERS:
        yield name
    for name, _ in find_plugin_filters():
        yield name
Exemple #2
0
def get_all_filters():
    """
    Return a generator of all filter names.
    """
    for name in FILTERS:
        yield name
    for name, _ in find_plugin_filters():
        yield name
Exemple #3
0
def find_filter_class(filtername):
    """
    Lookup a filter by name. Return None if not found.
    """
    if filtername in FILTERS:
        return FILTERS[filtername]
    for name, cls in find_plugin_filters():
        if name == filtername:
            return cls
    return None
Exemple #4
0
def find_filter_class(filtername):
    """
    Lookup a filter by name. Return None if not found.
    """
    if filtername in FILTERS:
        return FILTERS[filtername]
    for name, cls in find_plugin_filters():
        if name == filtername:
            return cls
    return None