Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add support for Pydantic models instubgen#19095

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
teplandr wants to merge7 commits intopython:master
base:master
Choose a base branch
Loading
fromteplandr:assign-ellipses-for-basemodel

Conversation

teplandr
Copy link

@teplandrteplandr commentedMay 16, 2025
edited
Loading

This PR adds support for generating stubs for Pydantic models instubgen.

Changes

  • Added detection of classes that inherit frompydantic.BaseModel directly or indirectly
  • Enhanced the stub generation process to add appropriate initializers (= ...) to field annotations in Pydantic models
  • Added comprehensive test cases for different Pydantic model scenarios

Fixes#16968

@teplandrteplandr changed the titleAdd support for Pydantic models in ASTStubGeneratorAdd support for Pydantic models instubgenMay 20, 2025
@teplandrteplandr marked this pull request as ready for reviewMay 20, 2025 11:03
@teplandr
Copy link
Author

Hello@JelleZijlstra! Hope you're doing well 🙂
I saw that you recently reviewed PR withstubgen improvements. Could you please take a look at proposed changes?
Thanks in advance!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Incorrect stub generation for subclasses ofpydantic.BaseModel
1 participant
@teplandr

[8]ページ先頭

©2009-2025 Movatter.jp