Skip to content

Conversation

mshsheikh
Copy link
Contributor

Adds 4 new tests to validate enforce_type_annotations:

  • Enforcement: Checks if unannotated functions raise errors.
  • Fallback: Confirms unannotated parameters default to Any when disabled.
  • Compatibility: Ensures positional args (e.g., function_schema(my_func, "sphinx")) still work.

See Updated Code:
https://github.com/openai/openai-agents-python/blob/main/src/agents/function_schema.py

Adds 4 new tests to validate enforce_type_annotations:

- Enforcement: Checks if unannotated functions raise errors.
- Fallback: Confirms unannotated parameters default to Any when disabled.
- Compatibility: Ensures positional args (e.g., function_schema(my_func, "sphinx")) still work.

See Updated Code:
https://github.com/openai/openai-agents-python/blob/main/src/agents/function_schema.py
@seratch seratch added the duplicate This issue or pull request already exists label Jul 14, 2025
@seratch
Copy link
Member

seratch commented Jul 14, 2025

Could you add these tests to #1092 instead? Thank you!

@seratch seratch closed this Jul 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants