MCPcopy Index your code
hub / github.com/Tencent/CodeAnalysis / get_valid_encode_files

Method get_valid_encode_files

client/tool/regexscanner.py:227–239  ·  view source on GitHub ↗

获取能正确解码的文件字符串

(self, toscans: list)

Source from the content-addressed store, hash-verified

225 return __lu__().format_cmd(tool_path, args)
226
227 def get_valid_encode_files(self, toscans: list):
228 """
229 获取能正确解码的文件字符串
230 """
231 new_toscans = []
232 for path in toscans:
233 try:
234 path.encode(encoding="UTF-8")
235 except UnicodeEncodeError:
236 logger.info("ignore file: %s" % path)
237 continue
238 new_toscans.append(path)
239 return new_toscans
240
241 def set_filter_type_list(self):
242 '''

Callers 1

analyzeMethod · 0.95

Calls 1

infoMethod · 0.45

Tested by

no test coverage detected