Title: Bad inference for asyncio.gather with *args · Issue #5124 · python/mypy · GitHub
Open Graph Title: Bad inference for asyncio.gather with *args · Issue #5124 · python/mypy
X Title: Bad inference for asyncio.gather with *args · Issue #5124 · python/mypy
Description: On the following file: import asyncio reveal_type(asyncio.gather(*[asyncio.sleep(1), asyncio.sleep(1)])) I expect to get something like Future[Tuple[Any, ...]], but actually with current master I get: $ mypy bin/asgat.py bin/asgat.py:3: ...
Open Graph Description: On the following file: import asyncio reveal_type(asyncio.gather(*[asyncio.sleep(1), asyncio.sleep(1)])) I expect to get something like Future[Tuple[Any, ...]], but actually with current master I g...
X Description: On the following file: import asyncio reveal_type(asyncio.gather(*[asyncio.sleep(1), asyncio.sleep(1)])) I expect to get something like Future[Tuple[Any, ...]], but actually with current master I g...
Opengraph URL: https://github.com/python/mypy/issues/5124
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bad inference for asyncio.gather with *args","articleBody":"On the following file:\r\n```python\r\nimport asyncio\r\n\r\nreveal_type(asyncio.gather(*[asyncio.sleep(1), asyncio.sleep(1)]))\r\n```\r\nI expect to get something like `Future[Tuple[Any, ...]]`, but actually with current master I get:\r\n```\r\n$ mypy bin/asgat.py \r\nbin/asgat.py:3: error: Revealed type is 'asyncio.futures.Future[Tuple[\u003cnothing>]]'\r\n```\r\n(i.e., a single-element tuple).\r\n\r\nThe asyncio.gather stubs at https://github.com/python/typeshed/blob/master/stdlib/3.4/asyncio/tasks.pyi#L27 look right to me.\r\n\r\nI found this in real code that was doing something like `a, b = await asyncio.gather(*[task1, task2])`.\r\n\r\ncc @Michael0x2a ","author":{"url":"https://github.com/JelleZijlstra","@type":"Person","name":"JelleZijlstra"},"datePublished":"2018-05-30T22:34:02Z","url":"https://github.com/python/mypy/issues/5124"}
| 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:6c007473-2a3b-ec1a-1599-2c9545aa83d3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8C76:1BCD46:215331:2CF7BD:6B0022EE |
| html-safe-nonce | 3b16bfa341f3fc50f5cb5f89d23506698fa2b21ce074311093ddf0fffbfdbbb2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Qzc2OjFCQ0Q0NjoyMTUzMzE6MkNGN0JEOjZCMDAyMkVFIiwidmlzaXRvcl9pZCI6IjgxMzE2MTM3NTM1MzI4MzMxMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | fff1954549ea4d44ec2c3dba218b7f7ba990000cec6a840027180af2fb0c06f7 |
| hovercard-subject-tag | issue:327923335 |
| 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/5124/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3055798da28474aa5685484a1d1d27ce4cfc046aea4bf237cfea70ea1d0c3f1c/python/mypy/issues/5124 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3055798da28474aa5685484a1d1d27ce4cfc046aea4bf237cfea70ea1d0c3f1c/python/mypy/issues/5124 |
| og:image:alt | On the following file: import asyncio reveal_type(asyncio.gather(*[asyncio.sleep(1), asyncio.sleep(1)])) I expect to get something like Future[Tuple[Any, ...]], but actually with current master I g... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JelleZijlstra |
| 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