MCPcopy Create free account
hub / github.com/mongodb/mongo-python-driver / translate_imports

Function translate_imports

tools/synchro.py:339–345  ·  view source on GitHub ↗
(lines: list[str])

Source from the content-addressed store, hash-verified

337
338
339def translate_imports(lines: list[str]) -> list[str]:
340 for k, v in import_replacements.items():
341 matches = [line for line in lines if k in line and "import" in line]
342 for line in matches:
343 index = lines.index(line)
344 lines[index] = line.replace(k, v)
345 return lines
346
347
348def translate_async_sleeps(lines: list[str]) -> list[str]:

Callers 1

process_filesFunction · 0.85

Calls 2

itemsMethod · 0.80
indexMethod · 0.80

Tested by

no test coverage detected