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

Function normalize_source_file_arg

docs/scripts/translate_docs.py:426–431  ·  view source on GitHub ↗
(file_arg: str)

Source from the content-addressed store, hash-verified

424
425
426def normalize_source_file_arg(file_arg: str) -> str:
427 if file_arg.startswith(f"{source_dir}/"):
428 return file_arg[len(source_dir) + 1 :]
429 if os.path.isabs(file_arg):
430 return os.path.relpath(file_arg, source_dir)
431 return file_arg
432
433
434def translate_source_files(

Callers 1

mainFunction · 0.85

Calls 1

relpathMethod · 0.80

Tested by

no test coverage detected