MCPcopy Create free account
hub / github.com/blacklanternsecurity/bbot / find_replace_file

Function find_replace_file

bbot/scripts/docs.py:123–130  ·  view source on GitHub ↗
(file, keyword, replace)

Source from the content-addressed store, hash-verified

121
122
123def find_replace_file(file, keyword, replace):
124 with open(file) as f:
125 content = f.read()
126 new_content = find_replace_markdown(content, keyword, replace)
127 if new_content != content:
128 if "BBOT_TESTING" not in os.environ:
129 with open(file, "w") as f:
130 f.write(new_content)
131
132
133def update_docs():

Callers 2

update_md_filesFunction · 0.85

Calls 2

openFunction · 0.85
find_replace_markdownFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…