Skip to content

Support annotated assignments within class definition in LocalPythonExecutor #1355

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 2 commits into from
May 20, 2025

Conversation

albertvillanova
Copy link
Member

Support annotated assignments within class definition in LocalPythonExecutor.

This will allow pydantic code:

from pydantic import BaseModel, Field                                                                                                                                         
                                                                                                                                                                                
  class MarkdownFile(BaseModel):                                                                                                                                                
      path: str = Field(description="The path to the markdown file")

Fix #1352.

Copy link
Collaborator

@aymeric-roucher aymeric-roucher left a comment

Choose a reason for hiding this comment

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

Nice addition! Thanks! 😃

@albertvillanova albertvillanova merged commit 16c7ace into huggingface:main May 20, 2025
3 checks passed
@albertvillanova albertvillanova deleted the fix-1352 branch May 20, 2025 12:07
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.

[BUG] Coding Agent cannot make pydantic types
2 participants