Title: TypedDict using keywords causes "error: Too many arguments for TypedDict()" · Issue #11555 · python/mypy · GitHub
Open Graph Title: TypedDict using keywords causes "error: Too many arguments for TypedDict()" · Issue #11555 · python/mypy
X Title: TypedDict using keywords causes "error: Too many arguments for TypedDict()" · Issue #11555 · python/mypy
Description: Bug Report In the typing docs for TypedDict there is an example of defining a TypedDict using keywords mapped to types Point2D = TypedDict('Point2D', x=int, y=int, label=str) When running mypy on this exact example, I get the following e...
Open Graph Description: Bug Report In the typing docs for TypedDict there is an example of defining a TypedDict using keywords mapped to types Point2D = TypedDict('Point2D', x=int, y=int, label=str) When running mypy on t...
X Description: Bug Report In the typing docs for TypedDict there is an example of defining a TypedDict using keywords mapped to types Point2D = TypedDict('Point2D', x=int, y=int, label=str) When running m...
Opengraph URL: https://github.com/python/mypy/issues/11555
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"TypedDict using keywords causes \"error: Too many arguments for TypedDict()\"","articleBody":"**Bug Report**\r\n\r\nIn the typing docs for `TypedDict` there is an example of defining a `TypedDict` using keywords mapped to types\r\n\r\n```\r\nPoint2D = TypedDict('Point2D', x=int, y=int, label=str)\r\n```\r\n\r\nWhen running mypy on this exact example, I get the following error:\r\n\r\n```\r\ntype_test.py:4: error: Too many arguments for TypedDict()\r\n```\r\n\r\nIf using the alternative definition with a positional dictionary, no error.\r\n\r\n```\r\nPoint2D = TypedDict('Point2D', {'x': int, 'y': int, 'label': str})\r\n```\r\n\r\nLink to docs:\r\nhttps://docs.python.org/3/library/typing.html#typing.TypedDict\r\n\r\n**To Reproduce**\r\n\r\n1. Create a file with the above code example and necessary imports\r\n2. Run mypy on file\r\n3. Observe error message\r\n\r\n**Expected Behavior**\r\n\r\nNo error\r\n\r\n**Actual Behavior**\r\n\r\nError.\r\n\r\n**Your Environment**\r\n\r\n- Mypy version used: 0.812 and 0.910 tested\r\n- Mypy command-line flags: none\r\n- Mypy configuration options from `mypy.ini` (and other config files): ignore_missing_imports=true\r\n- Python version used: 3.9.2\r\n- Operating system and version: macOS 11.6","author":{"url":"https://github.com/lillekemiker","@type":"Person","name":"lillekemiker"},"datePublished":"2021-11-14T19:52:52Z","url":"https://github.com/python/mypy/issues/11555"}
| 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:dd149e24-28c7-926c-0ea1-47a1f009e594 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E066:33DDEF:221401F:2EAF430:6B003410 |
| html-safe-nonce | 720bc95a38f17da07e3fee5677519df2a54b4d1575dc401731c4cfa822c7ed03 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMDY2OjMzRERFRjoyMjE0MDFGOjJFQUY0MzA6NkIwMDM0MTAiLCJ2aXNpdG9yX2lkIjoiNTc3OTU0MDg0MjY0OTc2MDc4NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 330fdf1807cbdc4fc4ba39815d17a6fa31c829b4e6d7d55860ef76bcf8ac03b2 |
| hovercard-subject-tag | issue:1053025701 |
| 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/11555/issue_layout |
| twitter:image | https://opengraph.githubassets.com/673acb8f3927af2e2c0e7cb47076853429499de5c57d86c48c820947bf884ccc/python/mypy/issues/11555 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/673acb8f3927af2e2c0e7cb47076853429499de5c57d86c48c820947bf884ccc/python/mypy/issues/11555 |
| og:image:alt | Bug Report In the typing docs for TypedDict there is an example of defining a TypedDict using keywords mapped to types Point2D = TypedDict('Point2D', x=int, y=int, label=str) When running mypy on t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lillekemiker |
| 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 | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width