Title: Making unittest type annotations for assertIsNone and assertIsNotNone stricter · Issue #8583 · python/typeshed · GitHub
Open Graph Title: Making unittest type annotations for assertIsNone and assertIsNotNone stricter · Issue #8583 · python/typeshed
X Title: Making unittest type annotations for assertIsNone and assertIsNotNone stricter · Issue #8583 · python/typeshed
Description: Dear typeshed team, first of all thanks for all the effort in this project. I am rather new to using Python typhints and I have taken quite some functionality in my IDE for granted. Recently, I tried to check a project of mine project wi...
Open Graph Description: Dear typeshed team, first of all thanks for all the effort in this project. I am rather new to using Python typhints and I have taken quite some functionality in my IDE for granted. Recently, I tri...
X Description: Dear typeshed team, first of all thanks for all the effort in this project. I am rather new to using Python typhints and I have taken quite some functionality in my IDE for granted. Recently, I tri...
Opengraph URL: https://github.com/python/typeshed/issues/8583
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Making unittest type annotations for assertIsNone and assertIsNotNone stricter","articleBody":"Dear typeshed team,\r\n\r\nfirst of all thanks for all the effort in this project. I am rather new to using Python typhints and I have taken quite some functionality in my IDE for granted. Recently, I tried to check a project of mine project with mypy and got some interesting results. As unittests and working examples were in place, I realized that several of the found issues were caused by not-so-perfect type hinting in the code. In one case, however, I thought that maybe the type hints provided by typeshed could be stricter.\r\n\r\nIn https://github.com/python/mypy/issues/5088#issuecomment-390518079, it is proposed that in the unittest stubs, `NoReturn` could be used whenever we know that an assert method call will fail. By elaborating the typehints of [assertIsNotNone](https://github.com/python/typeshed/blob/master/stdlib/unittest/case.pyi#L120), unittests could be even statically checked before execution. Obviously, the same is true for its symmetric partner `assertIsNone`.\r\n\r\nWould a corresponding pull request be accepted given that it satisfies the quality criteria of this repository?","author":{"url":"https://github.com/1kastner","@type":"Person","name":"1kastner"},"datePublished":"2022-08-21T14:10:13Z","url":"https://github.com/python/typeshed/issues/8583"}
| 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:16fb0d7f-ab48-35c6-125d-0b17155617cc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A74C:C5FC2:14EAC54:1B7DD7C:6B00175E |
| html-safe-nonce | 07b65e40f5834e2f329b45e0e4cbb333c7702ad8ef4a69d0553fb989c07ec85e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNzRDOkM1RkMyOjE0RUFDNTQ6MUI3REQ3Qzo2QjAwMTc1RSIsInZpc2l0b3JfaWQiOiI4ODM3Mzk1NjQxNDI5NjYxNTM0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 26c8e67a16055519650e35140e8cc5d7df4e82e171f6da3cfaa2bdef10cd33c7 |
| hovercard-subject-tag | issue:1345498356 |
| 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/8583/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ec37ce78760366d3e0c335c12a952bf7102a678f17b97894337688c8811362b7/python/typeshed/issues/8583 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ec37ce78760366d3e0c335c12a952bf7102a678f17b97894337688c8811362b7/python/typeshed/issues/8583 |
| og:image:alt | Dear typeshed team, first of all thanks for all the effort in this project. I am rather new to using Python typhints and I have taken quite some functionality in my IDE for granted. Recently, I tri... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | 1kastner |
| hostname | github.com |
| expected-hostname | github.com |
| None | a2dd2291b1b13cc9c06f27ec92fa3dbaf34116fc24c9347b8539db61884c59f4 |
| 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 | 70121d4e855ee0bb7b75cf15d061d91f8863c0f8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width