Title: Discrepancy between context and inferred type for list display in context containing complicated unions · Issue #2861 · python/mypy · GitHub
Open Graph Title: Discrepancy between context and inferred type for list display in context containing complicated unions · Issue #2861 · python/mypy
X Title: Discrepancy between context and inferred type for list display in context containing complicated unions · Issue #2861 · python/mypy
Description: I have a rather large type alias to figure out what the msgpack library can serialize. from typing import (cast, Any, Callable, Dict, Iterable, Iterator, List, NamedTuple, Sequence, Tuple, Union) _MsgPackable_ = Union[None, bool, int, fl...
Open Graph Description: I have a rather large type alias to figure out what the msgpack library can serialize. from typing import (cast, Any, Callable, Dict, Iterable, Iterator, List, NamedTuple, Sequence, Tuple, Union) _...
X Description: I have a rather large type alias to figure out what the msgpack library can serialize. from typing import (cast, Any, Callable, Dict, Iterable, Iterator, List, NamedTuple, Sequence, Tuple, Union) _...
Opengraph URL: https://github.com/python/mypy/issues/2861
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Discrepancy between context and inferred type for list display in context containing complicated unions","articleBody":"I have a rather large type alias to figure out what the `msgpack` library can serialize.\r\n\r\n```python\r\nfrom typing import (cast, Any, Callable, Dict, Iterable, Iterator, List, NamedTuple, Sequence, Tuple, Union)\r\n\r\n_MsgPackable_ = Union[None, bool, int, float, str, bytes]\r\n_MsgPackable = Union[_MsgPackable_, List[_MsgPackable_], Tuple[_MsgPackable_, ...], Dict[str, _MsgPackable_]]\r\nMsgPackable = Union[_MsgPackable, List[_MsgPackable], Tuple[_MsgPackable, ...], Dict[str, _MsgPackable]]\r\n\r\n\r\ndef test_method():\r\n #type: () -> Iterator[MsgPackable]\r\n return ((x, x) for x in range(30))\r\n```\r\n\r\nHowever, the above generates an error from your library. Yet your documentation suggests that something like this should work.\r\n\r\nI get that this is a fairly complex usage, but I'm unsure how else to do this sort of thing. Can you help?","author":{"url":"https://github.com/LivInTheLookingGlass","@type":"Person","name":"LivInTheLookingGlass"},"datePublished":"2017-02-13T19:55:37Z","url":"https://github.com/python/mypy/issues/2861"}
| 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:20627d8c-3890-b70c-7121-f2d8dcf8c77b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9E56:100874:10D4B28:1616B14:6B0007FE |
| html-safe-nonce | bb6fcd48efaa9239a20fc4aa13aa760e59a6d3ea368644c2f5ca7c548f4e2c68 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RTU2OjEwMDg3NDoxMEQ0QjI4OjE2MTZCMTQ6NkIwMDA3RkUiLCJ2aXNpdG9yX2lkIjoiNDM2MDM4MzQ4NTExOTAzOTQ4NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9242152f494a6d0f635bad9738aee5477a31a7af8546e966d27a7f6de9fbe8ca |
| hovercard-subject-tag | issue:207322200 |
| 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/2861/issue_layout |
| twitter:image | https://opengraph.githubassets.com/37606d48d56899bb18ca6774d1d9f1999dd0561185ed3699ae80dccbaceff8a3/python/mypy/issues/2861 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/37606d48d56899bb18ca6774d1d9f1999dd0561185ed3699ae80dccbaceff8a3/python/mypy/issues/2861 |
| og:image:alt | I have a rather large type alias to figure out what the msgpack library can serialize. from typing import (cast, Any, Callable, Dict, Iterable, Iterator, List, NamedTuple, Sequence, Tuple, Union) _... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | LivInTheLookingGlass |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729 |
| 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 | 16a11879678aaf97e2a42c33ee70830aa084fa37 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width