Title: New analyser: Crash in attrs plugin on bad or deferred name · Issue #7098 · python/mypy · GitHub
Open Graph Title: New analyser: Crash in attrs plugin on bad or deferred name · Issue #7098 · python/mypy
X Title: New analyser: Crash in attrs plugin on bad or deferred name · Issue #7098 · python/mypy
Description: Both of these crash with the new analyser: [case testTypeInAttrBad] import attr @attr.s class C: total = attr.ib(type=Bad) [builtins fixtures/bool.pyi] and [case testTypeInAttrBad2] import attr @attr.s class C: total = attr.ib(default=fu...
Open Graph Description: Both of these crash with the new analyser: [case testTypeInAttrBad] import attr @attr.s class C: total = attr.ib(type=Bad) [builtins fixtures/bool.pyi] and [case testTypeInAttrBad2] import attr @at...
X Description: Both of these crash with the new analyser: [case testTypeInAttrBad] import attr @attr.s class C: total = attr.ib(type=Bad) [builtins fixtures/bool.pyi] and [case testTypeInAttrBad2] import attr @at...
Opengraph URL: https://github.com/python/mypy/issues/7098
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"New analyser: Crash in attrs plugin on bad or deferred name","articleBody":"Both of these crash with the new analyser:\r\n```\r\n[case testTypeInAttrBad]\r\nimport attr\r\n\r\n@attr.s\r\nclass C:\r\n total = attr.ib(type=Bad)\r\n\r\n[builtins fixtures/bool.pyi]\r\n```\r\nand\r\n```\r\n[case testTypeInAttrBad2]\r\nimport attr\r\n\r\n@attr.s\r\nclass C:\r\n total = attr.ib(default=func())\r\n\r\ndef func(): ...\r\n[builtins fixtures/bool.pyi]\r\n```\r\nBoth crash with an assertion error because plugin doesn't expect a placeholder in class symbol table. I didn't check dataclasses, but likely there is a similar issue.","author":{"url":"https://github.com/ilevkivskyi","@type":"Person","name":"ilevkivskyi"},"datePublished":"2019-06-28T16:56:22Z","url":"https://github.com/python/mypy/issues/7098"}
| 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:9d7447d1-b648-b096-a1f6-1fa85c9272a2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E372:3A13A0:2406BC9:30E4A35:6B003025 |
| html-safe-nonce | 52b501645f744d119dbcc67e9bf2fb464a13513bcb221d0cf9c43833e277ff74 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMzcyOjNBMTNBMDoyNDA2QkM5OjMwRTRBMzU6NkIwMDMwMjUiLCJ2aXNpdG9yX2lkIjoiNDY5ODM4MDA1MTA1NjQzOTMzMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 453e6d8ac3cdcd1d7feee5303c746fd0056320da44662ab815bb5c9d5fe8c9a3 |
| hovercard-subject-tag | issue:462125328 |
| 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/7098/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0a6a9cf64470ad72d5fd56031b978522e76d1aca771ee25a83fed52970a0c4a0/python/mypy/issues/7098 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0a6a9cf64470ad72d5fd56031b978522e76d1aca771ee25a83fed52970a0c4a0/python/mypy/issues/7098 |
| og:image:alt | Both of these crash with the new analyser: [case testTypeInAttrBad] import attr @attr.s class C: total = attr.ib(type=Bad) [builtins fixtures/bool.pyi] and [case testTypeInAttrBad2] import attr @at... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ilevkivskyi |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0 |
| 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 | f3f3a43ca095cdea3abbb394112e971f9fdb94fa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width