(self, name: Optional[str])
return None
Returns rewrite for module name.
Returns rewrite for module name.
Returns rewrite for module name .
def _get_matched_rewrite(self, name: Optional[str]) -> Optional[Tuple[str, str]]:
        """Returns rewrite for module name."""
        if name is None:
            return None

        for from_, to in self.rewrites:
            if name == from_ or name.startswith(from_ + '.'):
                return from_, to

        return None
def _get_matched_rewrite ( self , name : Optional [ str ] ) -> Optional [ Tuple [ str , str ] ] : if name is None : return None for from_ , to in self . rewrites : if name == from_ or name . startswith ( from_ + '.' ) : return from_ , to return None