Title: Module-level `__annotations__` variable is flagged as undefined · Issue #10330 · python/mypy · GitHub
Open Graph Title: Module-level `__annotations__` variable is flagged as undefined · Issue #10330 · python/mypy
X Title: Module-level `__annotations__` variable is flagged as undefined · Issue #10330 · python/mypy
Description: To repro, run mypy on the following: print(__annotations__) test.py:1: error: Name '__annotations__' is not defined Found 1 error in 1 file (checked 1 source file) A pyright user recently noted the same issue in pyright, which I have fixed.
Open Graph Description: To repro, run mypy on the following: print(__annotations__) test.py:1: error: Name '__annotations__' is not defined Found 1 error in 1 file (checked 1 source file) A pyright user recently noted the...
X Description: To repro, run mypy on the following: print(__annotations__) test.py:1: error: Name '__annotations__' is not defined Found 1 error in 1 file (checked 1 source file) A pyright user recently n...
Opengraph URL: https://github.com/python/mypy/issues/10330
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Module-level `__annotations__` variable is flagged as undefined","articleBody":"To repro, run mypy on the following:\r\n\r\n```python\r\nprint(__annotations__)\r\n```\r\n\r\n```\r\ntest.py:1: error: Name '__annotations__' is not defined\r\nFound 1 error in 1 file (checked 1 source file)\r\n```\r\n\r\nA pyright user recently noted [the same issue in pyright](https://github.com/microsoft/pylance-release/issues/1161), which I have fixed. ","author":{"url":"https://github.com/erictraut","@type":"Person","name":"erictraut"},"datePublished":"2021-04-15T15:15:56Z","url":"https://github.com/python/mypy/issues/10330"}
| 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:70f3b0a2-050d-a39e-796d-b4f072077a3d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A96E:182C25:DFF465:12CF1FE:6B00577A |
| html-safe-nonce | 0494a7651cb77e073b3e8ed66f46c1a25c67aa9efd5413ac6a4e638365323cc6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOTZFOjE4MkMyNTpERkY0NjU6MTJDRjFGRTo2QjAwNTc3QSIsInZpc2l0b3JfaWQiOiIxMjc1NjY1MjAzNTAwOTYzNzA2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a8ce8d825c9d43abe7e2dbdc88b54fbcc8cbe90e37ed963915a39dd264b69186 |
| hovercard-subject-tag | issue:858986180 |
| 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/10330/issue_layout |
| twitter:image | https://opengraph.githubassets.com/782cdad28ee5cbc6b27db7c108c94374ee037d155ccd5444751e365016ce981e/python/mypy/issues/10330 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/782cdad28ee5cbc6b27db7c108c94374ee037d155ccd5444751e365016ce981e/python/mypy/issues/10330 |
| og:image:alt | To repro, run mypy on the following: print(__annotations__) test.py:1: error: Name '__annotations__' is not defined Found 1 error in 1 file (checked 1 source file) A pyright user recently noted the... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | erictraut |
| 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