Skip to content

Add return docstring to the function description #1207

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

Merged
merged 6 commits into from
Mar 22, 2025

Conversation

Kludex
Copy link
Member

@Kludex Kludex commented Mar 22, 2025

Copy link

github-actions bot commented Mar 22, 2025

Docs Preview

commit: ea28a45
Preview URL: https://50f676c4-pydantic-ai-previews.pydantic.workers.dev

Comment on lines 60 to 66
if docstring_style == 'google':
return_type = return_statement.name
type_tag = f'<type>{return_type}</type>\n' if return_type else ''
else:
return_type = return_statement.annotation
type_tag = f'<type>{return_type}</type>\n' if return_type else ''
return_xml = f'<returns>\n{type_tag}<description>{return_desc}</description>\n</returns>'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pawamoy I had to do this. FYI

@Kludex Kludex enabled auto-merge (squash) March 22, 2025 09:18
@Kludex Kludex merged commit ed85738 into main Mar 22, 2025
13 checks passed
@Kludex Kludex deleted the add-return-docstring-to-tool-description branch March 22, 2025 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tool return types and docstrings are not used
1 participant