Title: (🐞) False positive "error: Type application has too many types (1 expected)" on tuple when annotated as a type or in a `TypeAlias` with new union syntax (PEP 604) · Issue #11098 · python/mypy · GitHub
Open Graph Title: (🐞) False positive "error: Type application has too many types (1 expected)" on tuple when annotated as a type or in a `TypeAlias` with new union syntax (PEP 604) · Issue #11098 · python/mypy
X Title: (🐞) False positive "error: Type application has too many types (1 expected)" on tuple when annotated as a type or in a `TypeAlias` with new union syntax (PEP 604) · Issue #11098 · python/mypy
Description: mypy 0.910 a: type = tuple[int] # no error b = tuple[int] # no error c = tuple[int, int] # no error error: type = tuple[int, int] # error: Type application has too many types (1 expected) also on functions attributes: def foo(tp: type): ...
Open Graph Description: mypy 0.910 a: type = tuple[int] # no error b = tuple[int] # no error c = tuple[int, int] # no error error: type = tuple[int, int] # error: Type application has too many types (1 expected) also on f...
X Description: mypy 0.910 a: type = tuple[int] # no error b = tuple[int] # no error c = tuple[int, int] # no error error: type = tuple[int, int] # error: Type application has too many types (1 expected) also on f...
Opengraph URL: https://github.com/python/mypy/issues/11098
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"(🐞) False positive \"error: Type application has too many types (1 expected)\" on tuple when annotated as a type or in a `TypeAlias` with new union syntax (PEP 604)","articleBody":"mypy 0.910\r\n```py\r\na: type = tuple[int] # no error\r\nb = tuple[int] # no error\r\nc = tuple[int, int] # no error\r\nerror: type = tuple[int, int] # error: Type application has too many types (1 expected)\r\n```\r\n\r\nalso on functions attributes:\r\n```py\r\ndef foo(tp: type): ...\r\n\r\nfoo(tuple[int, int])\r\n```\r\n\r\nalso when in a new union syntax type alias:\r\n```py\r\nA = str | tuple[str, str] # error: Type application has too many types (1 expected)\r\n```\r\n\r\nhttps://mypy-play.net/?mypy=latest&python=3.10&flags=strict%2Ccheck-untyped-defs%2Cdisallow-any-decorated%2Cdisallow-any-expr%2Cdisallow-any-explicit%2Cdisallow-any-generics%2Cdisallow-any-unimported%2Cdisallow-incomplete-defs%2Cdisallow-subclassing-any%2Cdisallow-untyped-calls%2Cdisallow-untyped-decorators%2Cdisallow-untyped-defs%2Cwarn-incomplete-stub%2Cwarn-redundant-casts%2Cwarn-return-any%2Cwarn-unreachable%2Cwarn-unused-configs%2Cwarn-unused-ignores&gist=9604ab8dfb68e31788348b8ea36b54a1","author":{"url":"https://github.com/KotlinIsland","@type":"Person","name":"KotlinIsland"},"datePublished":"2021-09-13T06:24:43Z","url":"https://github.com/python/mypy/issues/11098"}
| 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:d478f9f6-f9a0-ab36-3403-866b3aac2bac |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9054:D064:20BDDCA:2C66251:6B001CF7 |
| html-safe-nonce | b05e6b3b062efc6c034091278e6bb3f20e085859ef682d07771f2d87b9294bf3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MDU0OkQwNjQ6MjBCRERDQToyQzY2MjUxOjZCMDAxQ0Y3IiwidmlzaXRvcl9pZCI6IjU1MDkzMjI5NzA5MjY5NDc1NzUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2c22c468d88252d6a57f89e0e977497f76885cb814fb931573bc19a78fd89069 |
| hovercard-subject-tag | issue:994504195 |
| 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/11098/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bbf1a930d558cbb1214c28863d094807aac845cb3e752229bacb1d82075be710/python/mypy/issues/11098 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bbf1a930d558cbb1214c28863d094807aac845cb3e752229bacb1d82075be710/python/mypy/issues/11098 |
| og:image:alt | mypy 0.910 a: type = tuple[int] # no error b = tuple[int] # no error c = tuple[int, int] # no error error: type = tuple[int, int] # error: Type application has too many types (1 expected) also on f... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | KotlinIsland |
| 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