MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / process_file

Function process_file

tools/convert_test_to_async.py:122–130  ·  view source on GitHub ↗
(input_file: str, output_file: str)

Source from the content-addressed store, hash-verified

120
121
122def process_file(input_file: str, output_file: str) -> None:
123 with open(input_file, "r+") as f:
124 lines = f.readlines()
125 lines = apply_replacements(lines)
126
127 with open(output_file, "w+") as f2:
128 f2.seek(0)
129 f2.writelines(lines)
130 f2.truncate()
131
132
133def main() -> None:

Callers 1

mainFunction · 0.85

Calls 5

apply_replacementsFunction · 0.85
readlinesMethod · 0.45
seekMethod · 0.45
writelinesMethod · 0.45
truncateMethod · 0.45

Tested by

no test coverage detected