Title: Undefined names used as decorators on top of `TypedDict` are not reported · Issue #21030 · python/mypy · GitHub
Open Graph Title: Undefined names used as decorators on top of `TypedDict` are not reported · Issue #21030 · python/mypy
X Title: Undefined names used as decorators on top of `TypedDict` are not reported · Issue #21030 · python/mypy
Description: The following shows no errors (see mypy Playground): from typing import TypedDict @abc @efg.hij @klm[nop] @qrs.tuv[wxy] class A(TypedDict): pass This only seems to occur on decorator expressions which also look like annotation expression...
Open Graph Description: The following shows no errors (see mypy Playground): from typing import TypedDict @abc @efg.hij @klm[nop] @qrs.tuv[wxy] class A(TypedDict): pass This only seems to occur on decorator expressions wh...
X Description: The following shows no errors (see mypy Playground): from typing import TypedDict @abc @efg.hij @klm[nop] @qrs.tuv[wxy] class A(TypedDict): pass This only seems to occur on decorator expressions wh...
Opengraph URL: https://github.com/python/mypy/issues/21030
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Undefined names used as decorators on top of `TypedDict` are not reported","articleBody":"The following shows no errors (see [mypy Playground](https://mypy-play.net/?mypy=master&python=3.12&gist=f9a7d7984ae6124654700cfe7db7d5d7)):\n\n```python\nfrom typing import TypedDict\n\n@abc\n@efg.hij\n@klm[nop]\n@qrs.tuv[wxy]\nclass A(TypedDict):\n pass\n```\n\nThis only seems to occur on decorator expressions which also look like annotation expressions.\n\n- Mypy version used: 1.19.1, master","author":{"url":"https://github.com/bzoracler","@type":"Person","name":"bzoracler"},"datePublished":"2026-03-17T01:56:35Z","url":"https://github.com/python/mypy/issues/21030"}
| 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:c6c9966f-ad0e-c46a-0fd2-50100c4542bd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EBC2:BACA4:2DA409B:3C62F0A:6B002578 |
| html-safe-nonce | 405399e332a13ec00283be0156b72b13dc32db7965c06c878b05cd07e7556420 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQkMyOkJBQ0E0OjJEQTQwOUI6M0M2MkYwQTo2QjAwMjU3OCIsInZpc2l0b3JfaWQiOiIyNDg3NzE0NzE5NzEyOTQ1NTI4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 4cf1a048bed067834c8420e6369f301183bce0a9c5b9b09f92d0adea6112c73b |
| hovercard-subject-tag | issue:4085751868 |
| 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/21030/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a88099e5c9168042421d982ee41a3688aefe01b0ccdb3c895c313d456a9bad58/python/mypy/issues/21030 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a88099e5c9168042421d982ee41a3688aefe01b0ccdb3c895c313d456a9bad58/python/mypy/issues/21030 |
| og:image:alt | The following shows no errors (see mypy Playground): from typing import TypedDict @abc @efg.hij @klm[nop] @qrs.tuv[wxy] class A(TypedDict): pass This only seems to occur on decorator expressions wh... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bzoracler |
| 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