Title: 0.990 reports error for function with body that is just ellipsis · Issue #14048 · python/mypy · GitHub
Open Graph Title: 0.990 reports error for function with body that is just ellipsis · Issue #14048 · python/mypy
X Title: 0.990 reports error for function with body that is just ellipsis · Issue #14048 · python/mypy
Description: Optional static typing for Python. Contribute to python/mypy development by creating an account on GitHub.
Open Graph Description: Optional static typing for Python. Contribute to python/mypy development by creating an account on GitHub.
X Description: Optional static typing for Python. Contribute to python/mypy development by creating an account on GitHub.
Opengraph URL: https://github.com/python/mypy
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"0.990 reports error for function with body that is just ellipsis","articleBody":"mypy 0.990 (python 3.8) reports an error for the following source code\r\n```py\r\ndef foo() -> int:\r\n ...\r\n```\r\n```\r\n$ mypy foo.py \r\n/tmp/foo.py:1: error: Missing return statement [empty-body]\r\nFound 1 error in 1 file (checked 1 source file)\r\n```\r\nmypy 0.981 would let the same code pass. Was that an intended change in between, or a regression?\r\n\r\nFrom [mypy CLI documentation](https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-no-warn-no-returnl)\r\n> By default, mypy will generate errors when a function is missing return statements in some execution paths. The only exceptions are when:\r\n> - The function has a None or Any return type\r\n> - The function has an empty body or a body that is just ellipsis (...). Empty functions are often used for abstract methods.\r\n\r\nI'd expect Success for the given example, because the 2nd exception (\"body that is just ellipsis\") applies.\r\n","author":{"url":"https://github.com/haxtibal","@type":"Person","name":"haxtibal"},"datePublished":"2022-11-09T11:58:08Z","url":"https://github.com/python/mypy/issues/14048"}
| 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 | /:user_id/:repository/issues/:id(.:format) |
| route-controller | issues |
| route-action | show |
| fetch-nonce | v2:b8ecbd8d-7b1d-371c-16b5-fef4991d9375 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9764:30501:BF2E09:1020B55:6B00516E |
| html-safe-nonce | 93a0973c8a0c1745f059a06e6f27b2ec09f3a04ac90d987c7b874c47b04aa4f2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NzY0OjMwNTAxOkJGMkUwOToxMDIwQjU1OjZCMDA1MTZFIiwidmlzaXRvcl9pZCI6IjcwODgzMjkwMjU0MTU4Mjc4MjIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f85c4081d5e7d90892a2496988f613fbe74653e380591ed8a449ec1bf40d07f5 |
| hovercard-subject-tag | repository:7053637 |
| 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/python/mypy/issues/14048 |
| twitter:image | https://opengraph.githubassets.com/f79ae5636353a0db17350af0a02700f2e9c3bbcf096f9450bf0c369c77cd1022/python/mypy |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f79ae5636353a0db17350af0a02700f2e9c3bbcf096f9450bf0c369c77cd1022/python/mypy |
| og:image:alt | Optional static typing for Python. Contribute to python/mypy development by creating an account on GitHub. |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | f420f4996e6b1ff1ccd6d7683f8134f4b5f0f8a50124c210dbfe7490e5644abb |
| turbo-cache-control | no-cache |
| 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 | 26e00df917aba0f128135dc073ea0c5e33a70d40 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width