Title: Binder doesn't work well with Type[...] · Issue #4616 · python/mypy · GitHub
Open Graph Title: Binder doesn't work well with Type[...] · Issue #4616 · python/mypy
X Title: Binder doesn't work well with Type[...] · Issue #4616 · python/mypy
Description: This code: from typing import Union, Type class C: ... x: Union[C, Type[C]] if isinstance(x, type) and issubclass(x, C): reveal_type(x) Shows that the type of x is builtins.type. Ideally it should be Type[C].
Open Graph Description: This code: from typing import Union, Type class C: ... x: Union[C, Type[C]] if isinstance(x, type) and issubclass(x, C): reveal_type(x) Shows that the type of x is builtins.type. Ideally it should ...
X Description: This code: from typing import Union, Type class C: ... x: Union[C, Type[C]] if isinstance(x, type) and issubclass(x, C): reveal_type(x) Shows that the type of x is builtins.type. Ideally it should ...
Opengraph URL: https://github.com/python/mypy/issues/4616
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Binder doesn't work well with Type[...]","articleBody":"This code:\r\n```python\r\nfrom typing import Union, Type\r\n\r\nclass C: ...\r\n\r\nx: Union[C, Type[C]]\r\n\r\nif isinstance(x, type) and issubclass(x, C):\r\n reveal_type(x)\r\n```\r\nShows that the type of `x` is `builtins.type`. Ideally it should be `Type[C]`.","author":{"url":"https://github.com/ilevkivskyi","@type":"Person","name":"ilevkivskyi"},"datePublished":"2018-02-21T20:45:49Z","url":"https://github.com/python/mypy/issues/4616"}
| 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:9b2014c1-044c-ad13-2009-a0e56313ba21 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DFA0:27AD12:E119C1:12D2951:6B005752 |
| html-safe-nonce | e4f9553a0f15d50da49c05329a3fd792a8e9ae2bb98ddd8972382f5333c76ac5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERkEwOjI3QUQxMjpFMTE5QzE6MTJEMjk1MTo2QjAwNTc1MiIsInZpc2l0b3JfaWQiOiI0MjU5OTU4NzEwMTI3ODQzMTU0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a928563ebd4d8e4d1afa3107688421c1b2fa1c3d0a1ca7b43eeaf684ec646d49 |
| hovercard-subject-tag | issue:299122274 |
| 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/4616/issue_layout |
| twitter:image | https://opengraph.githubassets.com/04e17f655e62e4265df9b9c91fedfbf665d1c8ebc1e01bc31e7c97cb9fecd17f/python/mypy/issues/4616 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/04e17f655e62e4265df9b9c91fedfbf665d1c8ebc1e01bc31e7c97cb9fecd17f/python/mypy/issues/4616 |
| og:image:alt | This code: from typing import Union, Type class C: ... x: Union[C, Type[C]] if isinstance(x, type) and issubclass(x, C): reveal_type(x) Shows that the type of x is builtins.type. Ideally it should ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ilevkivskyi |
| hostname | github.com |
| expected-hostname | github.com |
| None | f420f4996e6b1ff1ccd6d7683f8134f4b5f0f8a50124c210dbfe7490e5644abb |
| 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 | 26e00df917aba0f128135dc073ea0c5e33a70d40 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width