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

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

        Returns:
            Callable[[Callable[[AbstractExpression, Any], AbstractExpression]]]: A decorator
                function for adding an expression filter.
        """

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

        return decorator
def expression_filter(self, name, **kwargs):
        """
        Returns a decorator function for adding an expression filter.

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

        Returns:
            Callable[[Callable[[AbstractExpression, Any], AbstractExpression]]]: A decorator
                function for adding an expression filter.
        """

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

        return decorator
Returns a decorator function for adding an expression filter.

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

        Returns:
            Callable[[Callable[[AbstractExpression, Any], AbstractExpression]]]: A decorator
                function for adding an expression filter.