dea627097d8f4fbfdbb4ea48b282be2a4d5a60ce,src/python/pants/source/filespec.py,,globs_matches,#Any#Any#Any#,49

Before Change


      excluded.regexes = [re.compile(glob_to_regex(ex)) for ex in exclude_patterns]
    return any(ex.match(path) for ex in excluded.regexes)
  excluded.regexes = None
  for pattern in patterns:
    regex = re.compile(glob_to_regex(pattern))
    for path in paths:
      if regex.match(path) and not excluded(path):
        return True
  return False


def matches_filespec(path, spec):
  return any_matches_filespec([path], spec)

After Change




def globs_matches(paths, patterns, exclude_patterns):
  path_globs = PathGlobs(include=patterns, exclude=exclude_patterns)
  return Native().match_path_globs(path_globs, paths)


def matches_filespec(path, spec):
  return any_matches_filespec([path], spec)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: pantsbuild/pants
Commit Name: dea627097d8f4fbfdbb4ea48b282be2a4d5a60ce
Time: 2019-03-01
Author: stuhood@twitter.com
File Name: src/python/pants/source/filespec.py
Class Name:
Method Name: globs_matches


Project Name: pantsbuild/pants
Commit Name: ee50791d77ee69305a55e9d5b47fed12076411f4
Time: 2020-10-07
Author: greg.shuflin@toolchain.com
File Name: src/python/pants/bin/remote_pants_runner.py
Class Name: RemotePantsRunner
Method Name: _connect_and_execute


Project Name: pantsbuild/pants
Commit Name: e179d9c5614f901b5c1ff0d3b7c09247ee8b04a8
Time: 2020-11-11
Author: stuhood@gmail.com
File Name: src/python/pants/bin/remote_pants_runner.py
Class Name: RemotePantsRunner
Method Name: _connect_and_execute