Title: Enum.__members__ not recognized · Issue #1590 · python/typeshed · GitHub
Open Graph Title: Enum.__members__ not recognized · Issue #1590 · python/typeshed
X Title: Enum.__members__ not recognized · Issue #1590 · python/typeshed
Description: Despite the update in #1195, I still get an error when accessing an Enum's __members__ attribute with mypy 0.521 and Python 3.6.2: import enum class NetworkEventName(str, enum.Enum): CONNECTED = "connected" DISCONNECTED = "disconnected" ...
Open Graph Description: Despite the update in #1195, I still get an error when accessing an Enum's __members__ attribute with mypy 0.521 and Python 3.6.2: import enum class NetworkEventName(str, enum.Enum): CONNECTED = "c...
X Description: Despite the update in #1195, I still get an error when accessing an Enum's __members__ attribute with mypy 0.521 and Python 3.6.2: import enum class NetworkEventName(str, enum.Enum): CONNECTED ...
Opengraph URL: https://github.com/python/typeshed/issues/1590
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Enum.__members__ not recognized","articleBody":"Despite the update in #1195, I still get an error when accessing an Enum's `__members__` attribute with mypy 0.521 and Python 3.6.2:\r\n\r\n```py\r\nimport enum\r\n\r\n\r\nclass NetworkEventName(str, enum.Enum):\r\n CONNECTED = \"connected\"\r\n DISCONNECTED = \"disconnected\"\r\n CLOSE_REQUEST = \"close_request\"\r\n MESSAGE = \"message\"\r\n RAW_LINE = \"raw_line\"\r\n\r\n\r\nprint(NetworkEventName.__members__)\r\n\r\n```\r\n\r\n```\r\n> mypy /tmp/enum_test.py\r\n/tmp/enum_test.py:12: error: Type[NetworkEventName] has no attribute \"__members__\"\r\n\r\n> python /tmp/enum_test.py\r\nOrderedDict([('CONNECTED', \u003cNetworkEventName.CONNECTED: 'connected'>), ('DISCONNECTED', \u003cNetworkEventName.DISCONNECTED: 'disconnected'>), ('CLOSE_REQUEST', \u003cNetworkEventName.CLOSE_REQUEST: 'close_request'>), ('MESSAGE', \u003cNetworkEventName.MESSAGE: 'message'>), ('RAW_LINE', \u003cNetworkEventName.RAW_LINE: 'raw_line'>)])\r\n```\r\n\r\n\r\nhttps://github.com/python/typeshed/blob/385b9c8b660e4275fbb48765ced6a14911159782/stdlib/3.4/enum.pyi#L12-L13","author":{"url":"https://github.com/FichteFoll","@type":"Person","name":"FichteFoll"},"datePublished":"2017-09-06T13:47:22Z","url":"https://github.com/python/typeshed/issues/1590"}
| 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:e3cb2f9d-8342-2270-c9bb-e29f5dcbde5b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ACAA:3A7693:1D3229D:276A486:6B000994 |
| html-safe-nonce | 8f9d013c55849a342ec864c5a88f3841ea73be80181bb4a69b06c9e4f87ad761 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQ0FBOjNBNzY5MzoxRDMyMjlEOjI3NkE0ODY6NkIwMDA5OTQiLCJ2aXNpdG9yX2lkIjoiNTM4MjAwMzQ2NzIxMDQ1OTU0MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d6a183251a45276a292fd04382c6b8de9d2f9c711406f5b0cf085f43a7d5d411 |
| hovercard-subject-tag | issue:255610002 |
| 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/typeshed/1590/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4fcbc6fb6fa9421887290ae7cfb3e659d352965bb07d4f3aa8eec4b0d197cb86/python/typeshed/issues/1590 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4fcbc6fb6fa9421887290ae7cfb3e659d352965bb07d4f3aa8eec4b0d197cb86/python/typeshed/issues/1590 |
| og:image:alt | Despite the update in #1195, I still get an error when accessing an Enum's __members__ attribute with mypy 0.521 and Python 3.6.2: import enum class NetworkEventName(str, enum.Enum): CONNECTED = "c... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | FichteFoll |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/typeshed git https://github.com/python/typeshed.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 31696383 |
| octolytics-dimension-repository_nwo | python/typeshed |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31696383 |
| octolytics-dimension-repository_network_root_nwo | python/typeshed |
| 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 | 16a11879678aaf97e2a42c33ee70830aa084fa37 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width