Title: Star-star syntax not allowed with TypedDict · Issue #9408 · python/mypy · GitHub
Open Graph Title: Star-star syntax not allowed with TypedDict · Issue #9408 · python/mypy
X Title: Star-star syntax not allowed with TypedDict · Issue #9408 · python/mypy
Description: 🐛 Bug Report This is similar to #6462 and #9335 but with the star-star syntax. There are cases where mypy could prove the following program type-safe, but currently this is never allowed: To Reproduce from typing import TypedDict class V...
Open Graph Description: 🐛 Bug Report This is similar to #6462 and #9335 but with the star-star syntax. There are cases where mypy could prove the following program type-safe, but currently this is never allowed: To Reprod...
X Description: 🐛 Bug Report This is similar to #6462 and #9335 but with the star-star syntax. There are cases where mypy could prove the following program type-safe, but currently this is never allowed: To Reprod...
Opengraph URL: https://github.com/python/mypy/issues/9408
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Star-star syntax not allowed with TypedDict","articleBody":"## 🐛 Bug Report\r\n\r\nThis is similar to #6462 and #9335 but with the star-star syntax.\r\n\r\nThere are cases where mypy could prove the following program type-safe, but currently this is never allowed:\r\n\r\n## To Reproduce\r\n\r\n```python\r\nfrom typing import TypedDict\r\n\r\n\r\nclass Value(TypedDict):\r\n key1: str\r\n key2: str\r\n\r\n\r\nconst1: Value = {\"key1\": \"foo\", \"key2\": \"bar\"}\r\nconst2: Value = {**const1, \"key2\": \"eggs\"}\r\n# ^^^^^^^^\r\n# mypy: Expected TypedDict key to be string literal (10:20)\r\n```\r\n\r\n- Mypy version used: mypy 0.780\r\n- Python version used: 3.8.6\r\n","author":{"url":"https://github.com/intgr","@type":"Person","name":"intgr"},"datePublished":"2020-09-03T14:45:17Z","url":"https://github.com/python/mypy/issues/9408"}
| 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:864276e2-e47d-1b3f-145d-8f0dea4c2b9b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CB3A:2C3D4F:CD0964:1122CC5:6B005083 |
| html-safe-nonce | 3a24a753f0ff196737e6e4bd7d61c0d3a6dedac18fadcc114dd4287d60e72738 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQjNBOjJDM0Q0RjpDRDA5NjQ6MTEyMkNDNTo2QjAwNTA4MyIsInZpc2l0b3JfaWQiOiI5MTk3OTEyMDIyMjc1MDg0NDE5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | e89dc9e88b75c5f2b1a691fa77cba473389b76e9c9f8e11d7887d0dfabc4e915 |
| hovercard-subject-tag | issue:692035481 |
| 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/9408/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1f6a6a7cc3d3f7513ec188ce4c0dcc05a4a7e3282b4f74e0632940875f362cf4/python/mypy/issues/9408 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1f6a6a7cc3d3f7513ec188ce4c0dcc05a4a7e3282b4f74e0632940875f362cf4/python/mypy/issues/9408 |
| og:image:alt | 🐛 Bug Report This is similar to #6462 and #9335 but with the star-star syntax. There are cases where mypy could prove the following program type-safe, but currently this is never allowed: To Reprod... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | intgr |
| 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