Title: stdlib.3.unitest.mock missing NonCallableMock methods · Issue #3842 · python/typeshed · GitHub
Open Graph Title: stdlib.3.unitest.mock missing NonCallableMock methods · Issue #3842 · python/typeshed
X Title: stdlib.3.unitest.mock missing NonCallableMock methods · Issue #3842 · python/typeshed
Description: I'm using pycharm and found on this stack overflow answer that pycharm uses typeshed for its stub autocompletion. I'm not having the autocompletions of any Mock or MagickMock methods (such as assert_called , assert_called_once and so on)...
Open Graph Description: I'm using pycharm and found on this stack overflow answer that pycharm uses typeshed for its stub autocompletion. I'm not having the autocompletions of any Mock or MagickMock methods (such as asser...
X Description: I'm using pycharm and found on this stack overflow answer that pycharm uses typeshed for its stub autocompletion. I'm not having the autocompletions of any Mock or MagickMock methods (such ...
Opengraph URL: https://github.com/python/typeshed/issues/3842
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"stdlib.3.unitest.mock missing NonCallableMock methods","articleBody":"I'm using pycharm and found on this [stack overflow answer](https://stackoverflow.com/a/58053514) that pycharm uses typeshed for its stub autocompletion. \r\n\r\nI'm not having the autocompletions of any Mock or MagickMock methods (such as `assert_called\r\n`, `assert_called_once` and so on).\r\n\r\nBrowsing the typeshed code I stumbled upon this line\r\nhttps://github.com/python/typeshed/blob/5162c536c88c4bf46ab74ef09a51165597e90d49/stdlib/3/unittest/mock.pyi#L38\r\n\r\nThere's a TODO annotation 3 lines above mentioning some false positives\r\nhttps://github.com/python/typeshed/blob/5162c536c88c4bf46ab74ef09a51165597e90d49/stdlib/3/unittest/mock.pyi#L35\r\n\r\nWhat does the `Any` do on `NonCallableMock`?\r\n\r\nShouldn't we have all methods declared no this `NonCallableMock`? Or this was the cause of the TODO?\r\n\r\nI'm volunteering to open a PR if we should have all [mock methods](https://docs.python.org/3/library/unittest.mock.html#unittest.mock.Mock) declared\r\n\r\n\r\n","author":{"url":"https://github.com/rodrigondec","@type":"Person","name":"rodrigondec"},"datePublished":"2020-03-11T13:41:19Z","url":"https://github.com/python/typeshed/issues/3842"}
| 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:4f248884-638b-1d8d-d109-2c6ef4d2a98f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B146:1BCD46:94A4F0:C6E22D:6B0043E2 |
| html-safe-nonce | 1fe807c34d4777dda3ada1babd67a9f5dae74824cbcfb1777fff70490e26ac63 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMTQ2OjFCQ0Q0Njo5NEE0RjA6QzZFMjJEOjZCMDA0M0UyIiwidmlzaXRvcl9pZCI6IjYxNDE1NzU3MDQ4ODc3MDY1OTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7869756eed1167835e705590453dcd9301a9ce0996e8cab479a4016de1e99e0c |
| hovercard-subject-tag | issue:579273117 |
| 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/3842/issue_layout |
| twitter:image | https://opengraph.githubassets.com/04547d2edef5ebaedfa711b5f211aa4230e26c777132d38a524101afccc65c25/python/typeshed/issues/3842 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/04547d2edef5ebaedfa711b5f211aa4230e26c777132d38a524101afccc65c25/python/typeshed/issues/3842 |
| og:image:alt | I'm using pycharm and found on this stack overflow answer that pycharm uses typeshed for its stub autocompletion. I'm not having the autocompletions of any Mock or MagickMock methods (such as asser... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rodrigondec |
| 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