Title: Error reported when '__annotations__' is accessed · Issue #3075 · python/mypy · GitHub
Open Graph Title: Error reported when '__annotations__' is accessed · Issue #3075 · python/mypy
X Title: Error reported when '__annotations__' is accessed · Issue #3075 · python/mypy
Description: class A: a: int = 0 b: int = 1 print(A.__annotations__) mypy output: error: "A" has no attribute "__annotations__" checked with mypy v0.501
Open Graph Description: class A: a: int = 0 b: int = 1 print(A.__annotations__) mypy output: error: "A" has no attribute "__annotations__" checked with mypy v0.501
X Description: class A: a: int = 0 b: int = 1 print(A.__annotations__) mypy output: error: "A" has no attribute "__annotations__" checked with mypy v0.501
Opengraph URL: https://github.com/python/mypy/issues/3075
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Error reported when '__annotations__' is accessed","articleBody":"```python\r\nclass A:\r\n a: int = 0\r\n b: int = 1\r\n\r\nprint(A.__annotations__)\r\n```\r\nmypy output:\r\n`error: \"A\" has no attribute \"__annotations__\"`\r\n\r\nchecked with mypy v0.501\r\n","author":{"url":"https://github.com/peterazmanov","@type":"Person","name":"peterazmanov"},"datePublished":"2017-03-29T15:49:08Z","url":"https://github.com/python/mypy/issues/3075"}
| 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:55ce5f7e-ed8b-5fd3-f76c-170b5765494f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E762:73851:78A3D6:A6D3CC:6B002410 |
| html-safe-nonce | 32efa1ad0559f22cd7d94d069f5b5e73b6efe0775b0fb46ec867a0a6bb78c0e0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNzYyOjczODUxOjc4QTNENjpBNkQzQ0M6NkIwMDI0MTAiLCJ2aXNpdG9yX2lkIjoiMzc3ODIwNzE1NjgxODUwMzg0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 786fa8f5efc0e5133f5ab894757ee9ae4a436473cbe188b2714802b4cdb3d810 |
| hovercard-subject-tag | issue:217921960 |
| 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/3075/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f18d68a9e362aae60eaf139d22d720e4e8e9b937acdc423ce7c4d88258279de7/python/mypy/issues/3075 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f18d68a9e362aae60eaf139d22d720e4e8e9b937acdc423ce7c4d88258279de7/python/mypy/issues/3075 |
| og:image:alt | class A: a: int = 0 b: int = 1 print(A.__annotations__) mypy output: error: "A" has no attribute "__annotations__" checked with mypy v0.501 |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | peterazmanov |
| 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