def resolve_for(self, node):
        """
        Resolves this query relative to the given node.

        Args:
            node (node.Base): The node to be evaluated.

        Returns:
            int: The number of matches found.
        """

        self.node = node
        self.actual_text = normalize_text(
            node.visible_text if self.query_type == "visible" else node.all_text)
        self.count = len(re.findall(self.search_regexp, self.actual_text))

        return self.count
def resolve_for(self, node):
        """
        Resolves this query relative to the given node.

        Args:
            node (node.Base): The node to be evaluated.

        Returns:
            int: The number of matches found.
        """

        self.node = node
        self.actual_text = normalize_text(
            node.visible_text if self.query_type == "visible" else node.all_text)
        self.count = len(re.findall(self.search_regexp, self.actual_text))

        return self.count
def resolve_for ( self , node ) : self . node = node self . actual_text = normalize_text ( node . visible_text if self . query_type == "visible" else node . all_text ) self . count = len ( re . findall ( self . search_regexp , self . actual_text ) ) return self . count
Resolves this query relative to the given node.

        Args:
            node (node.Base): The node to be evaluated.

        Returns:
            int: The number of matches found.
Resolves this query relative to the given node .