MCPcopy
hub / github.com/blackboxo/CleanMyWechat / build_whitelist

Method build_whitelist

main.py:1004–1008  ·  view source on GitHub ↗
(self, user_config)

Source from the content-addressed store, hash-verified

1002 total_stats["categories"][key]["size"] += value.get("size", 0)
1003
1004 def build_whitelist(self, user_config):
1005 file_paths, file_exts = read_whitelist_file()
1006 cfg_paths = [os.path.abspath(os.path.expandvars(p)) for p in user_config.get("whitelist_paths", [])]
1007 cfg_exts = [normalize_ext(e) for e in user_config.get("whitelist_exts", [])]
1008 return file_paths + cfg_paths, set(file_exts + cfg_exts)
1009
1010 def is_in_whitelist(self, file_path, whitelist_paths, whitelist_exts):
1011 ext = normalize_ext(os.path.splitext(str(file_path))[1])

Callers 1

get_fileNumMethod · 0.95

Calls 2

read_whitelist_fileFunction · 0.85
normalize_extFunction · 0.85

Tested by

no test coverage detected