Title: Stub functions should only typecheck for None · Issue #4066 · python/mypy · GitHub
Open Graph Title: Stub functions should only typecheck for None · Issue #4066 · python/mypy
X Title: Stub functions should only typecheck for None · Issue #4066 · python/mypy
Description: This passes in mypy 0.521: def foo(): # type: () -> int pass mypy --py2 --strict demo.py does not show any errors. If a function body does not contain a return statement or a yield statement it should only have a type of None I believe.
Open Graph Description: This passes in mypy 0.521: def foo(): # type: () -> int pass mypy --py2 --strict demo.py does not show any errors. If a function body does not contain a return statement or a yield statement it sho...
X Description: This passes in mypy 0.521: def foo(): # type: () -> int pass mypy --py2 --strict demo.py does not show any errors. If a function body does not contain a return statement or a yield statement it ...
Opengraph URL: https://github.com/python/mypy/issues/4066
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Stub functions should only typecheck for None","articleBody":"This passes in mypy 0.521:\r\n\r\n```python\r\ndef foo(): # type: () -> int\r\n pass\r\n```\r\n\r\n`mypy --py2 --strict demo.py` does not show any errors. If a function body does not contain a `return` statement or a `yield` statement it should only have a type of `None` I believe.","author":{"url":"https://github.com/Wilfred","@type":"Person","name":"Wilfred"},"datePublished":"2017-10-06T14:21:54Z","url":"https://github.com/python/mypy/issues/4066"}
| 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:0ad25a3e-cef8-c14b-5923-f71c9c9595b3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A002:2A087:33B598:4563A2:6B00286C |
| html-safe-nonce | a2577e0695db2b33bade4e8fb78342b4d194e903ad527ca2f7dfca3736b6692c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMDAyOjJBMDg3OjMzQjU5ODo0NTYzQTI6NkIwMDI4NkMiLCJ2aXNpdG9yX2lkIjoiODc3ODk4NTQxNzY0MzkyNzY2MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | debba6800065caed6416f8687e43bfe36f02b00a2f320194c2d9e4994226495a |
| hovercard-subject-tag | issue:263463171 |
| 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/mypy/4066/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3462836e76b326d6f2ce402d1390e72d2b129464d60c7bc87bde0bccb2280919/python/mypy/issues/4066 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3462836e76b326d6f2ce402d1390e72d2b129464d60c7bc87bde0bccb2280919/python/mypy/issues/4066 |
| og:image:alt | This passes in mypy 0.521: def foo(): # type: () -> int pass mypy --py2 --strict demo.py does not show any errors. If a function body does not contain a return statement or a yield statement it sho... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Wilfred |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/mypy git https://github.com/python/mypy.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 7053637 |
| octolytics-dimension-repository_nwo | python/mypy |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7053637 |
| octolytics-dimension-repository_network_root_nwo | python/mypy |
| 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 | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width