MCPcopy Create free account
hub / github.com/apache/datafusion / update_docs

Function update_docs

dev/update_datafusion_versions.py:113–121  ·  view source on GitHub ↗
(path: str, new_version: str)

Source from the content-addressed store, hash-verified

111
112
113def update_docs(path: str, new_version: str):
114 print(f"updating docs in {path}")
115 with open(path, 'r+') as fd:
116 content = fd.read()
117 fd.seek(0)
118 content = re.sub(r'datafusion\s*=\s*"(.+?)"', f'datafusion = "{new_version}"', content)
119 content = re.sub(r'datafusion\s*=\s*\{\s*version\s*=\s*"(.+?)"', f'datafusion = {{ version = "{new_version}"', content)
120 fd.truncate()
121 fd.write(content)
122
123
124def main():

Callers 1

mainFunction · 0.85

Calls 4

readMethod · 0.80
subMethod · 0.45
truncateMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…