Title: Followup tasks for checkmember.py refactoring · Issue #19299 · python/mypy · GitHub
Open Graph Title: Followup tasks for checkmember.py refactoring · Issue #19299 · python/mypy
X Title: Followup tasks for checkmember.py refactoring · Issue #19299 · python/mypy
Description: These are some of the remaining tasks after #7724 is done. These are either somewhat tricky and/or somewhat boring and/or less pressing. In no particular order: We should cleanup/unify attribute writeability logic when checking overrides...
Open Graph Description: These are some of the remaining tasks after #7724 is done. These are either somewhat tricky and/or somewhat boring and/or less pressing. In no particular order: We should cleanup/unify attribute wr...
X Description: These are some of the remaining tasks after #7724 is done. These are either somewhat tricky and/or somewhat boring and/or less pressing. In no particular order: We should cleanup/unify attribute wr...
Opengraph URL: https://github.com/python/mypy/issues/19299
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Followup tasks for checkmember.py refactoring","articleBody":"These are some of the remaining tasks after https://github.com/python/mypy/issues/7724 is done. These are either somewhat tricky and/or somewhat boring and/or less pressing. In no particular order:\n* We should cleanup/unify attribute writeability logic when checking overrides and subtyping. Most notably:\n - Multiple inheritance is quite messy in this regard.\n - Descriptors with custom `__set__()` should follow the same logic (including use of `mutable-override` error code) as properties with custom setters in protocol subtyping and LSP checks.\n* We need to set `type_checker` in more places to benefit from the new (complete) logic for `find_member()`, most notable in `semanal_typeargs.py` and in post-semanal plugins.\n* Now that all attribute access is going through `checkmember ` we should refactor it itself. Couple ideas:\n - Merge `bind_self()` and `check_self_arg()`\n - Generalize/extend `analyze_decorator_or_funcbase_access()`\n - Cleanup class attribute access and unify it with instance attribute access\n* We should re-think how deferrals work, and re-enable some deferrals that are currently skipped (current logic is too limited, we stop all inference after first deferral, and can't defer module scope). The new logic may be like this:\n - We can defer either a module scope or a top-level function (similar to fine-grained incremental)\n - Use \"sticky\" (i.e. propagating to nested nodes) flag to suppress `Any`-related error reporting\n - Use new `TypeOfAny` to suppress inferring bogus `Any` types for variables\n - Update all `isinstance()`-like checks to handle this new kind of `Any`\n* Cleanup `Var` (and related `RefExpr` and `AssignmentStmt`) flags. There are way too many of them, and some of them are used inconsistently.\n* Couple pedantic things we shouldn't even do:\n - Check class level access for descriptor overrides\n - Take into account `__getattr__()` for LSP checks","author":{"url":"https://github.com/ilevkivskyi","@type":"Person","name":"ilevkivskyi"},"datePublished":"2025-06-14T18:48:13Z","url":"https://github.com/python/mypy/issues/19299"}
| 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:ebeb3b47-60a0-3513-8548-01c50daa610e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D378:1D5C28:FECA71:14E876E:6AFFF997 |
| html-safe-nonce | 02d3b76207fb9681b27b4cc40a8f224009113ff4faa1b450ea024c395aca9548 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMzc4OjFENUMyODpGRUNBNzE6MTRFODc2RTo2QUZGRjk5NyIsInZpc2l0b3JfaWQiOiI5MDU4MjAxMzQ0NjM2MDkwNzc1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | be0db1d0285165560e8feb39b46cc700f236028caedd66b1de82905bbfa8d934 |
| hovercard-subject-tag | issue:3146549729 |
| 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/19299/issue_layout |
| twitter:image | https://opengraph.githubassets.com/30988c31c435db132432357f43bb8afc3b5418566ed18c581480a329eb021e3b/python/mypy/issues/19299 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/30988c31c435db132432357f43bb8afc3b5418566ed18c581480a329eb021e3b/python/mypy/issues/19299 |
| og:image:alt | These are some of the remaining tasks after #7724 is done. These are either somewhat tricky and/or somewhat boring and/or less pressing. In no particular order: We should cleanup/unify attribute wr... |
| 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 | 0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729 |
| 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 | 16a11879678aaf97e2a42c33ee70830aa084fa37 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width