MCPcopy Index your code
hub / github.com/bugy/script-server / exclude

Method exclude

tools/build.py:29–46  ·  view source on GitHub ↗
(self, path)

Source from the content-addressed store, hash-verified

27 self.files.add(file)
28
29 def exclude(self, path):
30 matching_files = file_utils.search_glob(path, recursive=True)
31
32 for excluded in matching_files:
33 if excluded in self.files:
34 self.files.remove(excluded)
35
36 if os.path.isdir(excluded):
37 files_to_remove = []
38
39 for file in self.files:
40 common_path = os.path.commonprefix([excluded, file])
41
42 if common_path == excluded:
43 files_to_remove.append(file)
44
45 for file_to_remove in files_to_remove:
46 self.files.remove(file_to_remove)
47
48 def get_files(self):
49 return self.files

Callers 1

build.pyFile · 0.80

Calls 2

removeMethod · 0.80
appendMethod · 0.80

Tested by

no test coverage detected