Filter#

class Filter(func, **kwargs)#

Bases: object

Manage a filter.

Parameters:

func (Callable[[...], bool])

get_filter_func()#

Return filter function.

Return type:

Callable[[Finder, str, Matches], bool]

get_partial_func(**kwargs)#

Return user function with stored kwargs.

Return type:

Callable[[…], bool]

is_valid(finder, filename, matches)#

Return if the corresponding filename is valid.

Parameters:
Return type:

bool

filter_func: Callable[[Finder, str, Matches], bool]#

Function to be used as a filter.

name: str#

Name of the filter.

partial_func: Callable[[...], bool]#

Function with kwargs stored.

user_func: Callable[[...], bool]#

Initial function given by the user.