capybara/selector/selector.py
def node_filter(self, name, **kwargs):
        """
        Returns a decorator function for adding a node filter.

        Args:
            name (str): The name of the filter.
            **kwargs: Variable keyword arguments for the filter.

        Returns:
            Callable[[Callable[[Element, Any], bool]]]: A decorator function for adding a node
                filter.
        """

        def decorator(func):
            self.filters[name] = NodeFilter(name, func, **kwargs)

        return decorator
def node_filter(self, name, **kwargs):
        """
        Returns a decorator function for adding a node filter.

        Args:
            name (str): The name of the filter.
            **kwargs: Variable keyword arguments for the filter.

        Returns:
            Callable[[Callable[[Element, Any], bool]]]: A decorator function for adding a node
                filter.
        """

        def decorator(func):
            self.filters[name] = NodeFilter(name, func, **kwargs)

        return decorator
def node_filter ( self , name , * * kwargs ) : def decorator ( func ) : self . filters [ name ] = NodeFilter ( name , func , * * kwargs ) return decorator
Returns a decorator function for adding a node filter.

        Args:
            name (str): The name of the filter.
            **kwargs: Variable keyword arguments for the filter.

        Returns:
            Callable[[Callable[[Element, Any], bool]]]: A decorator function for adding a node
                filter.
Returns a decorator function for adding a node filter .