Title: mock.patch.object type annotation fails with **kwargs · Issue #7542 · python/typeshed · GitHub
Open Graph Title: mock.patch.object type annotation fails with **kwargs · Issue #7542 · python/typeshed
X Title: mock.patch.object type annotation fails with **kwargs · Issue #7542 · python/typeshed
Description: https://mypy-play.net/?mypy=latest&python=3.10&gist=6f7d6d1036646b8e8a41ed3a5dab3b98&flags=strict from unittest import mock import subprocess def foo() -> None: with mock.patch.object( subprocess, "Popen", **{"return_value.communicate.si...
Open Graph Description: https://mypy-play.net/?mypy=latest&python=3.10&gist=6f7d6d1036646b8e8a41ed3a5dab3b98&flags=strict from unittest import mock import subprocess def foo() -> None: with mock.patch.object( subprocess, ...
X Description: https://mypy-play.net/?mypy=latest&python=3.10&gist=6f7d6d1036646b8e8a41ed3a5dab3b98&flags=strict from unittest import mock import subprocess def foo() -> None: with mock.patch.objec...
Opengraph URL: https://github.com/python/typeshed/issues/7542
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"mock.patch.object type annotation fails with **kwargs","articleBody":"https://mypy-play.net/?mypy=latest&python=3.10&gist=6f7d6d1036646b8e8a41ed3a5dab3b98&flags=strict\r\n\r\n```python\r\nfrom unittest import mock\r\nimport subprocess\r\n\r\n\r\ndef foo() -> None:\r\n with mock.patch.object(\r\n subprocess,\r\n \"Popen\",\r\n **{\"return_value.communicate.side_effect\": KeyboardInterrupt}\r\n ):\r\n pass\r\n```","author":{"url":"https://github.com/graingert","@type":"Person","name":"graingert"},"datePublished":"2022-03-24T10:55:14Z","url":"https://github.com/python/typeshed/issues/7542"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:06da6097-7102-f9fd-e5f1-bfbceb3ec1d4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 982A:2C0A92:30F4155:40A88E3:6B002BDF |
| html-safe-nonce | 74408b6fd4b7e89de12e9a9415a8634336dd7948b3b504471446ffc15500a4d3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5ODJBOjJDMEE5MjozMEY0MTU1OjQwQTg4RTM6NkIwMDJCREYiLCJ2aXNpdG9yX2lkIjoiNzY0ODM2Mjk2NjYyNjA4NTg1NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 17fdf78acdbc6dfbe8fd49f40bfcbdd0d0150982fe0883c5d30e9448bd57fc34 |
| hovercard-subject-tag | issue:1179341212 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/typeshed/7542/issue_layout |
| twitter:image | https://opengraph.githubassets.com/980879c6253bbbe92685fb7d2f97300be6c2782708b5ebf704cd5006cbcd8ce2/python/typeshed/issues/7542 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/980879c6253bbbe92685fb7d2f97300be6c2782708b5ebf704cd5006cbcd8ce2/python/typeshed/issues/7542 |
| og:image:alt | https://mypy-play.net/?mypy=latest&python=3.10&gist=6f7d6d1036646b8e8a41ed3a5dab3b98&flags=strict from unittest import mock import subprocess def foo() -> None: with mock.patch.object( subprocess, ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | graingert |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/typeshed git https://github.com/python/typeshed.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 31696383 |
| octolytics-dimension-repository_nwo | python/typeshed |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31696383 |
| octolytics-dimension-repository_network_root_nwo | python/typeshed |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f3f3a43ca095cdea3abbb394112e971f9fdb94fa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width