Skip to content

docs: Improve type safety in code examples using TContext #1359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

Hafiz-Muhammad-Umar12
Copy link

This pull request aims to improve the type safety and clarity of code examples throughout the documentation.

The core change is replacing the generic Any type with TContext wherever RunContextWrapper is used. This modification is crucial because it:

  • Provides a more accurate and robust demonstration of the SDK's context system.
  • Aligns the code examples with best practices for type hinting in Python.
  • Enhances the overall readability and quality of the documentation.

This change will serve as a strong reference for new and experienced developers alike, helping them write more type-safe and reliable agent code.

@seratch
Copy link
Member

seratch commented Aug 3, 2025

Let me close this one for the same reason with #1358

@seratch seratch added the duplicate This issue or pull request already exists label Aug 3, 2025
@seratch seratch closed this Aug 3, 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