Exemple #1
0
 def WhereMatches(self, pattern):
   """Looks for |pattern| within all paths & names."""
   regex = re.compile(match_util.ExpandRegexIdentifierPlaceholder(pattern))
   return self.Filter(lambda s: (regex.search(s.source_path) or
                                 regex.search(s.object_path) or
                                 regex.search(s.full_name or '') or
                                 regex.search(s.name)))
Exemple #2
0
 def matches(pattern, target):
     regex = re.compile(
         match_util.ExpandRegexIdentifierPlaceholder(pattern))
     return bool(regex.search(target) and regex.search(' %s ' % target))
Exemple #3
0
 def WhereComponentMatches(self, pattern):
   regex = re.compile(match_util.ExpandRegexIdentifierPlaceholder(pattern))
   return self.Filter(lambda s: regex.search(s.component))
Exemple #4
0
 def WherePathMatches(self, pattern):
   regex = re.compile(match_util.ExpandRegexIdentifierPlaceholder(pattern))
   return self.Filter(lambda s: (regex.search(s.source_path) or
                                 regex.search(s.object_path)))
Exemple #5
0
 def WhereTemplateNameMatches(self, pattern):
   regex = re.compile(match_util.ExpandRegexIdentifierPlaceholder(pattern))
   return self.Filter(lambda s: regex.search(s.template_name))