(
        self, included_nodes: Set[UniqueId], selector: str
    )
Yields nodes from inclucded that match the given path.
Yields nodes from inclucded that match the given path.
Yields nodes from inclucded that match the given path .
def search(
        self, included_nodes: Set[UniqueId], selector: str
    ) -> Iterator[UniqueId]:
        """Yields nodes from inclucded that match the given path.

        """
        # use '.' and not 'root' for easy comparison
        root = Path.cwd()
        paths = set(p.relative_to(root) for p in root.glob(selector))
        for node, real_node in self.all_nodes(included_nodes):
            if Path(real_node.root_path) != root:
                continue
            ofp = Path(real_node.original_file_path)
            if ofp in paths:
                yield node
            elif any(parent in paths for parent in ofp.parents):
                yield node
def search ( self , included_nodes : Set [ UniqueId ] , selector : str ) -> Iterator [ UniqueId ] : # use '.' and not 'root' for easy comparison root = Path . cwd ( ) paths = set ( p . relative_to ( root ) for p in root . glob ( selector ) ) for node , real_node in self . all_nodes ( included_nodes ) : if Path ( real_node . root_path ) != root : continue ofp = Path ( real_node . original_file_path ) if ofp in paths : yield node elif any ( parent in paths for parent in ofp . parents ) : yield node