MCPcopy
hub / github.com/openai/openai-agents-python / MyClass

Class MyClass

tests/test_function_schema.py:243–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241
242
243class MyClass:
244 def foo(self, a: int, b: int = 5):
245 return a + b
246
247 def foo_ctx(self, ctx: RunContextWrapper[str], a: int, b: int = 5):
248 return a + b
249
250 @classmethod
251 def bar(cls, a: int, b: int = 5):
252 return a + b
253
254 @classmethod
255 def bar_ctx(cls, ctx: RunContextWrapper[str], a: int, b: int = 5):
256 return a + b
257
258 @staticmethod
259 def baz(a: int, b: int = 5):
260 return a + b
261
262 @staticmethod
263 def baz_ctx(ctx: RunContextWrapper[str], a: int, b: int = 5):
264 return a + b
265
266
267def test_class_based_functions():

Callers 1

Calls

no outgoing calls

Tested by 1