MCPcopy Index your code
hub / github.com/EvanLi/Github-Ranking / write_text

Function write_text

source/common.py:13–19  ·  view source on GitHub ↗

write text to file method: 'a'-append, 'w'-overwrite

(file_name, method, text)

Source from the content-addressed store, hash-verified

11
12
13def write_text(file_name, method, text):
14 """
15 write text to file
16 method: 'a'-append, 'w'-overwrite
17 """
18 with open(file_name, method, encoding='utf-8') as f:
19 f.write(text)
20
21
22def write_ranking_repo(file_name, method, repos):

Callers 2

write_head_contentsMethod · 0.90
write_readme_lang_mdMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected