Title: no error when no argument in `TypeGuard` function · Issue #13199 · python/mypy · GitHub
Open Graph Title: no error when no argument in `TypeGuard` function · Issue #13199 · python/mypy
X Title: no error when no argument in `TypeGuard` function · Issue #13199 · python/mypy
Description: from typing import TypeGuard def foo() -> TypeGuard[int]: ... # no error playground
Open Graph Description: from typing import TypeGuard def foo() -> TypeGuard[int]: ... # no error playground
X Description: from typing import TypeGuard def foo() -> TypeGuard[int]: ... # no error playground
Opengraph URL: https://github.com/python/mypy/issues/13199
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"no error when no argument in `TypeGuard` function","articleBody":"```py\r\nfrom typing import TypeGuard\r\n\r\ndef foo() -> TypeGuard[int]: ... # no error\r\n```\r\n[playground](https://mypy-play.net/?mypy=master&python=3.10&flags=show-error-codes%2Callow-redefinition%2Cstrict%2Ccheck-untyped-defs%2Cdisallow-any-decorated%2Cdisallow-any-expr%2Cdisallow-any-explicit%2Cdisallow-any-generics%2Cdisallow-any-unimported%2Cdisallow-incomplete-defs%2Cdisallow-subclassing-any%2Cdisallow-untyped-calls%2Cdisallow-untyped-decorators%2Cdisallow-untyped-defs%2Cno-implicit-optional%2Cno-implicit-reexport%2Cstrict-equality%2Cwarn-incomplete-stub%2Cwarn-redundant-casts%2Cwarn-return-any%2Cwarn-unreachable%2Cwarn-unused-configs%2Cwarn-unused-ignores&gist=5c5d885cfc2c3b91a9852459f0806d01)","author":{"url":"https://github.com/DetachHead","@type":"Person","name":"DetachHead"},"datePublished":"2022-07-20T06:53:13Z","url":"https://github.com/python/mypy/issues/13199"}
| 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:91c554a9-7928-8e58-6587-41656433bcec |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9F20:3E987B:2481FA:31451E:6B002411 |
| html-safe-nonce | 9b7733b80026b8bb16c26110619b65cc679be34e69122577a394d1888cfac46c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RjIwOjNFOTg3QjoyNDgxRkE6MzE0NTFFOjZCMDAyNDExIiwidmlzaXRvcl9pZCI6Ijc0ODc1MDkyMzQ0MzU3NjExNjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5111e24c7e04d68ae79b21f0da8aa00b73b6715cb5249f1e78f9b7240ee8b1af |
| hovercard-subject-tag | issue:1310535202 |
| 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/13199/issue_layout |
| twitter:image | https://opengraph.githubassets.com/72135bf1c0e64c835cdfc3896b340c07d7b9317d62a5704cdd715f06786ce5b2/python/mypy/issues/13199 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/72135bf1c0e64c835cdfc3896b340c07d7b9317d62a5704cdd715f06786ce5b2/python/mypy/issues/13199 |
| og:image:alt | from typing import TypeGuard def foo() -> TypeGuard[int]: ... # no error playground |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | DetachHead |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0 |
| 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 | 44c658b24abf00491fb7ae5f56d42c9f38cbeab2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width