Title: Refresh of partial type produces the wrong type in fine-grained incremental mode · Issue #4464 · python/mypy · GitHub
Open Graph Title: Refresh of partial type produces the wrong type in fine-grained incremental mode · Issue #4464 · python/mypy
X Title: Refresh of partial type produces the wrong type in fine-grained incremental mode · Issue #4464 · python/mypy
Description: This test case fails in fine-grained incremental mode, though the code is okay in batch mode: [case testRefreshPartialSpanningScopes] import a a.x class A: x = None def f(self) -> None: a.x self.x = '' # Incompatible types in assignment ...
Open Graph Description: This test case fails in fine-grained incremental mode, though the code is okay in batch mode: [case testRefreshPartialSpanningScopes] import a a.x class A: x = None def f(self) -> None: a.x self.x ...
X Description: This test case fails in fine-grained incremental mode, though the code is okay in batch mode: [case testRefreshPartialSpanningScopes] import a a.x class A: x = None def f(self) -> None: a.x self...
Opengraph URL: https://github.com/python/mypy/issues/4464
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Refresh of partial type produces the wrong type in fine-grained incremental mode","articleBody":"This test case fails in fine-grained incremental mode, though the code is okay in batch mode:\r\n\r\n```\r\n[case testRefreshPartialSpanningScopes]\r\nimport a\r\na.x\r\n\r\nclass A:\r\n x = None\r\n\r\n def f(self) -> None:\r\n a.x\r\n self.x = '' # Incompatible types in assignment (expression has type \"str\", \r\n # variable has type \"None\")\r\n[file a.py]\r\nx = 0\r\n[file a.py.2]\r\nx = ''\r\n```\r\n\r\nThe type of attribute `A.x` is derived from information in two scopes (class body and method `f`), and this logic fails in fine-grained incremental mode.\r\n\r\nThe best fix might be to require an annotation for `x` in class body.","author":{"url":"https://github.com/JukkaL","@type":"Person","name":"JukkaL"},"datePublished":"2018-01-12T14:07:50Z","url":"https://github.com/python/mypy/issues/4464"}
| 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:a60fd9f7-e526-7bfd-47c8-4a1ce82b5fe4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8954:28B001:1C1FFD:278A82:6B0056F7 |
| html-safe-nonce | 564bf2bd868ded5ed67c50e4224a2ade27dd0e53b28922198c1e40d644989d30 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OTU0OjI4QjAwMToxQzFGRkQ6Mjc4QTgyOjZCMDA1NkY3IiwidmlzaXRvcl9pZCI6IjMzMTEzMjE1NjU0MDQwOTIxNTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b0c51bfd82fa42214231cd10af9581d0698b808da55ef074818047bea0593426 |
| hovercard-subject-tag | issue:288129768 |
| 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/4464/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2711a99ebefb3fbf19c7ee9ab65014d92515444a90fb4f8f096ffc1c8f505972/python/mypy/issues/4464 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2711a99ebefb3fbf19c7ee9ab65014d92515444a90fb4f8f096ffc1c8f505972/python/mypy/issues/4464 |
| og:image:alt | This test case fails in fine-grained incremental mode, though the code is okay in batch mode: [case testRefreshPartialSpanningScopes] import a a.x class A: x = None def f(self) -> None: a.x self.x ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JukkaL |
| hostname | github.com |
| expected-hostname | github.com |
| None | f420f4996e6b1ff1ccd6d7683f8134f4b5f0f8a50124c210dbfe7490e5644abb |
| 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 | 26e00df917aba0f128135dc073ea0c5e33a70d40 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width