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

Added reference for return_value in unittest.mock documentation#119207

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
encukou merged 2 commits intopython:mainfromTialo:patch-1
May 20, 2024

Conversation

Tialo
Copy link
Contributor

@TialoTialo commentedMay 20, 2024
edited by github-actionsbot
Loading

Added reference forreturn_value in documentation


📚 Documentation preview 📚:https://cpython-previews--119207.org.readthedocs.build/

@ghost
Copy link

ghost commentedMay 20, 2024
edited by ghost
Loading

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-appbedevere-appbot added docsDocumentation in the Doc dir skip news awaiting review labelsMay 20, 2024
Copy link
Contributor

@blaisepblaisep left a comment

Choose a reason for hiding this comment

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

Small change to improve consistency, Nice.

@@ -420,7 +420,7 @@ the *new_callable* argument to :func:`patch`.
parameter as ``True``. Child mocks and the return value mock
(if any) are reset as well.

.. note::*return_value*, and :attr:`side_effect` are keyword-only
.. note:::attr:`return_value`, and :attr:`side_effect` are keyword-only
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice! Attention to detail, increases consistency.

blaisep reacted with thumbs up emoji
Copy link
Contributor

Choose a reason for hiding this comment

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

@encukou , LMK if I need to look for anything else.

Copy link
Member

Choose a reason for hiding this comment

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

Both of these refer to the function arguments, so they should be marked up as such (*return_value* and*side_effect*).

But, a bit above in:

 In case you want to reset *return_value* or :attr:`side_effect`

these refer to attributes of the Mock objects, and should use:attr: (return_value should be changed to use:attr:).

@Tialo
Copy link
ContributorAuthor

Also added :attr: for return_value above

@encukou
Copy link
Member

Thank you!

@encukouencukou added needs backport to 3.12only security fixes needs backport to 3.13bugs and security fixes labelsMay 20, 2024
@miss-islington-app
Copy link

Thanks@Tialo for the PR, and@encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Thanks@Tialo for the PR, and@encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMay 20, 2024
…H-119207)(cherry picked from commit6b80a5b)Co-authored-by: Tialo <65392801+Tialo@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMay 20, 2024
…H-119207)(cherry picked from commit6b80a5b)Co-authored-by: Tialo <65392801+Tialo@users.noreply.github.com>
@bedevere-app
Copy link

GH-119249 is a backport of this pull request to the3.12 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.12only security fixes labelMay 20, 2024
@bedevere-app
Copy link

GH-119250 is a backport of this pull request to the3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelMay 20, 2024
encukou pushed a commit that referenced this pull requestMay 20, 2024
…H-119207) (GH-119249)Use correct markup in unittest.mock.reset_mock documentation (GH-119207)(cherry picked from commit6b80a5b)Co-authored-by: Tialo <65392801+Tialo@users.noreply.github.com>
encukou pushed a commit that referenced this pull requestMay 20, 2024
…H-119207) (GH-119250)Use correct markup in unittest.mock.reset_mock documentation (GH-119207)(cherry picked from commit6b80a5b)Co-authored-by: Tialo <65392801+Tialo@users.noreply.github.com>
@TialoTialo deleted the patch-1 branchMay 23, 2024 18:24
estyxx pushed a commit to estyxx/cpython that referenced this pull requestJul 17, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@blaisepblaisepblaisep approved these changes

@encukouencukouencukou left review comments

Assignees
No one assigned
Labels
docsDocumentation in the Doc dirskip issueskip news
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@Tialo@encukou@blaisep

[8]ページ先頭

©2009-2025 Movatter.jp