Title: Built-in generics as super classes · Issue #10731 · python/mypy · GitHub
Open Graph Title: Built-in generics as super classes · Issue #10731 · python/mypy
X Title: Built-in generics as super classes · Issue #10731 · python/mypy
Description: Bug Report Please consider the following stub file: class Foo(list[str]): bar: list[str] When checking this with mypy --python-version=3.8 foo.pyi (mypy 0.910, Python 3.9.4), I get the following output: foo.pyi:1: error: "list" is not su...
Open Graph Description: Bug Report Please consider the following stub file: class Foo(list[str]): bar: list[str] When checking this with mypy --python-version=3.8 foo.pyi (mypy 0.910, Python 3.9.4), I get the following ou...
X Description: Bug Report Please consider the following stub file: class Foo(list[str]): bar: list[str] When checking this with mypy --python-version=3.8 foo.pyi (mypy 0.910, Python 3.9.4), I get the following ou...
Opengraph URL: https://github.com/python/mypy/issues/10731
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Built-in generics as super classes","articleBody":"**Bug Report**\r\n\r\nPlease consider the following stub file:\r\n\r\n```python\r\nclass Foo(list[str]):\r\n bar: list[str]\r\n```\r\n\r\nWhen checking this with `mypy --python-version=3.8 foo.pyi` (mypy 0.910, Python 3.9.4), I get the following output:\r\n\r\n```\r\nfoo.pyi:1: error: \"list\" is not subscriptable\r\nFound 1 error in 1 file (checked 1 source file)\r\n```\r\n\r\nPlease note that it complains about line 1, but not line 2. It will not complain when running in Python 3.9+ mode. See also #9980 and #10303.\r\n","author":{"url":"https://github.com/srittau","@type":"Person","name":"srittau"},"datePublished":"2021-06-28T12:51:48Z","url":"https://github.com/python/mypy/issues/10731"}
| 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:6912cd17-a69d-414d-bfc9-812297f668fe |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EDF2:245A38:B7F5AA:F762DF:6B004E5C |
| html-safe-nonce | 40fa7de3b35709632b8dbdba6434f74b58bd59e6b1ba62075199ac3862afabe2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFREYyOjI0NUEzODpCN0Y1QUE6Rjc2MkRGOjZCMDA0RTVDIiwidmlzaXRvcl9pZCI6IjYzOTM0MDcxODY2ODg1NjA3MzIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d724a28e8daf674d282e284130d6fa391c6e04794c554975fd8ca2dfeac5f548 |
| hovercard-subject-tag | issue:931537584 |
| 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/10731/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9b87333cc821845a7cb735fff1e0922d10d69391e788fce0c46d571b22c36bf2/python/mypy/issues/10731 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9b87333cc821845a7cb735fff1e0922d10d69391e788fce0c46d571b22c36bf2/python/mypy/issues/10731 |
| og:image:alt | Bug Report Please consider the following stub file: class Foo(list[str]): bar: list[str] When checking this with mypy --python-version=3.8 foo.pyi (mypy 0.910, Python 3.9.4), I get the following ou... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | srittau |
| hostname | github.com |
| expected-hostname | github.com |
| None | f9517bf360d46638a1e5e7daee7158842fe5ef43c9000afa0e127564a7c2f39b |
| 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 | b27c5dde30676028abd5c5fc53ce5c9b625f8281 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width