Title: mypy allows `TypedDict` classes with metaclasses · Issue #16432 · python/mypy · GitHub
Open Graph Title: mypy allows `TypedDict` classes with metaclasses · Issue #16432 · python/mypy
X Title: mypy allows `TypedDict` classes with metaclasses · Issue #16432 · python/mypy
Description: from typing import TypedDict class A(type): ... class Foo(TypedDict, metaclass=A): x: int This code raises no errors in mypy. But, PEP says: https://peps.python.org/pep-0589/ Specifying a metaclass is not allowed. I am working on a PR.
Open Graph Description: from typing import TypedDict class A(type): ... class Foo(TypedDict, metaclass=A): x: int This code raises no errors in mypy. But, PEP says: https://peps.python.org/pep-0589/ Specifying a metaclass...
X Description: from typing import TypedDict class A(type): ... class Foo(TypedDict, metaclass=A): x: int This code raises no errors in mypy. But, PEP says: https://peps.python.org/pep-0589/ Specifying a metaclass...
Opengraph URL: https://github.com/python/mypy/issues/16432
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"mypy allows `TypedDict` classes with metaclasses","articleBody":"```python\r\nfrom typing import TypedDict\r\n\r\nclass A(type): ...\r\n\r\nclass Foo(TypedDict, metaclass=A):\r\n x: int\r\n```\r\n\r\nThis code raises no errors in mypy. But, PEP says: https://peps.python.org/pep-0589/\r\n\r\n> Specifying a metaclass is not allowed.\r\n\r\nI am working on a PR.","author":{"url":"https://github.com/sobolevn","@type":"Person","name":"sobolevn"},"datePublished":"2023-11-09T13:22:21Z","url":"https://github.com/python/mypy/issues/16432"}
| 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:50fef24c-244f-b712-400b-28d9f5ee5e4d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A990:D064:116B51E:174DEB4:6AFFC7D0 |
| html-safe-nonce | 2158a337c2a152c42752ae5811b6c3c644a596ab48a430ff0fe78bde6dc096c5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOTkwOkQwNjQ6MTE2QjUxRToxNzRERUI0OjZBRkZDN0QwIiwidmlzaXRvcl9pZCI6Ijg5OTE0NTIyNDc1NDgwODc4NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f61b7b52f4688c6bc86391c0761d5c3e2ab1cb92cdb154c25773c09d4195997f |
| hovercard-subject-tag | issue:1985615930 |
| 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/16432/issue_layout |
| twitter:image | https://opengraph.githubassets.com/11d6df4ff293d7578bc7a490670154fca37e694e1ac071afa43967324bec2beb/python/mypy/issues/16432 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/11d6df4ff293d7578bc7a490670154fca37e694e1ac071afa43967324bec2beb/python/mypy/issues/16432 |
| og:image:alt | from typing import TypedDict class A(type): ... class Foo(TypedDict, metaclass=A): x: int This code raises no errors in mypy. But, PEP says: https://peps.python.org/pep-0589/ Specifying a metaclass... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sobolevn |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1e805b832df235bb21305db712c3b6432920019dfc12cb25b9cb8d3b0c9403cf |
| 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 | 8fa4a54e6871c7908eda1c246ad5972982c0b59d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width