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

gh-124176: Add special support for dataclasses tocreate_autospec#124429

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

Merged
sobolevn merged 4 commits intopython:mainfromsobolevn:issue-124176
Sep 27, 2024

Conversation

sobolevn
Copy link
Member

@sobolevnsobolevn commentedSep 24, 2024
edited by bedevere-appbot
Loading

Now creating autospecs from dataclass types is easier. We inspect all fields and add them to__dir__, so mock's spec will know about future dataclass instance fields.

Copy link
Member

@ericvsmithericvsmith left a comment

Choose a reason for hiding this comment

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

I'm not a user of unittest.mock, but these changes look reasonable to me.

Copy link
Member

@carljmcarljm left a comment

Choose a reason for hiding this comment

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

This looks reasonable to me as well.

Copy link
Contributor

@cjw296cjw296 left a comment

Choose a reason for hiding this comment

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

Supportive of the change, just the code hygiene changes to make.

@bedevere-app
Copy link

When you're done making the requested changes, leave the comment:I have made the requested changes; please review again.

@sobolevn
Copy link
MemberAuthor

@cjw296 done! 👍

Copy link
Contributor

@ncoghlanncoghlan left a comment
edited
Loading

Choose a reason for hiding this comment

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

LGTM! I especially like the test coverage.

sobolevn reacted with heart emoji
Copy link
Contributor

@cjw296cjw296 left a comment

Choose a reason for hiding this comment

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

Nice!

@sobolevnsobolevn merged commit3a0e7f5 intopython:mainSep 27, 2024
35 of 36 checks passed
@sobolevn
Copy link
MemberAuthor

Thanks everyone! 🎉

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@cjw296cjw296cjw296 approved these changes

@ncoghlanncoghlanncoghlan approved these changes

@carljmcarljmcarljm approved these changes

@ericvsmithericvsmithericvsmith approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@sobolevn@carljm@ericvsmith@cjw296@ncoghlan

[8]ページ先頭

©2009-2025 Movatter.jp