MCPcopy Create free account
hub / github.com/openai/openai-agents-python / translate_source_files

Function translate_source_files

docs/scripts/translate_docs.py:434–456  ·  view source on GitHub ↗
(
    file_paths: list[str], *, check_translation_outdated: bool = True
)

Source from the content-addressed store, hash-verified

432
433
434def translate_source_files(
435 file_paths: list[str], *, check_translation_outdated: bool = True
436) -> None:
437 unique_paths = list(dict.fromkeys(file_paths))
438 if not unique_paths:
439 return
440 concurrency = min(6, len(unique_paths))
441 if concurrency <= 1:
442 translate_single_source_file(
443 unique_paths[0], check_translation_outdated=check_translation_outdated
444 )
445 return
446 with ThreadPoolExecutor(max_workers=concurrency) as executor:
447 futures = [
448 executor.submit(
449 translate_single_source_file,
450 path,
451 check_translation_outdated=check_translation_outdated,
452 )
453 for path in unique_paths
454 ]
455 for future in futures:
456 future.result()
457
458
459def main():

Callers 1

mainFunction · 0.85

Calls 2

resultMethod · 0.80

Tested by

no test coverage detected