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

Function process_files

tools/synchro.py:285–302  ·  view source on GitHub ↗
(
    files: list[str], docstring_translate_files: list[str], sync_test_files: list[str]
)

Source from the content-addressed store, hash-verified

283
284
285def process_files(
286 files: list[str], docstring_translate_files: list[str], sync_test_files: list[str]
287) -> None:
288 for file in files:
289 if "__init__" not in file or "__init__" and "test" in file:
290 with open(file, "r+") as f:
291 lines = f.readlines()
292 lines = apply_is_sync(lines, file)
293 lines = translate_coroutine_types(lines)
294 lines = translate_async_sleeps(lines)
295 if file in docstring_translate_files:
296 lines = translate_docstrings(lines)
297 if file in sync_test_files:
298 lines = translate_imports(lines)
299 lines = process_ignores(lines)
300 f.seek(0)
301 f.writelines(lines)
302 f.truncate()
303
304
305def apply_is_sync(lines: list[str], file: str) -> list[str]:

Callers 1

mainFunction · 0.85

Calls 10

apply_is_syncFunction · 0.85
translate_async_sleepsFunction · 0.85
translate_docstringsFunction · 0.85
translate_importsFunction · 0.85
process_ignoresFunction · 0.85
readlinesMethod · 0.45
seekMethod · 0.45
writelinesMethod · 0.45
truncateMethod · 0.45

Tested by

no test coverage detected