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

Function apply_is_sync

tools/synchro.py:305–316  ·  view source on GitHub ↗
(lines: list[str], file: str)

Source from the content-addressed store, hash-verified

303
304
305def apply_is_sync(lines: list[str], file: str) -> list[str]:
306 try:
307 is_sync = next(iter([line for line in lines if line.startswith("_IS_SYNC = ")]))
308 index = lines.index(is_sync)
309 is_sync = is_sync.replace("False", "True")
310 lines[index] = is_sync
311 except StopIteration as e:
312 print(
313 f"Missing _IS_SYNC at top of async file {file.replace('synchronous', 'asynchronous')}"
314 )
315 raise e
316 return lines
317
318
319def translate_coroutine_types(lines: list[str]) -> list[str]:

Callers 1

process_filesFunction · 0.85

Calls 3

nextFunction · 0.85
iterFunction · 0.85
indexMethod · 0.80

Tested by

no test coverage detected