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

Class ExampleScript

examples/run_examples.py:102–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100
101@dataclass
102class ExampleScript:
103 path: Path
104 tags: set[str] = field(default_factory=set)
105
106 @property
107 def relpath(self) -> str:
108 return normalize_relpath(str(self.path.relative_to(ROOT_DIR)))
109
110 @property
111 def module(self) -> str:
112 relative = self.path.relative_to(ROOT_DIR).with_suffix("")
113 return ".".join(relative.parts)
114
115 @property
116 def command(self) -> list[str]:
117 # Run via module path so relative imports inside examples work.
118 return [*build_uv_run_command(), "python", "-u", "-m", self.module]
119
120
121@dataclass

Callers 1

discover_examplesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected