Title: Meta issue tracker, pt 2 · Issue #16472 · python/mypy · GitHub
Open Graph Title: Meta issue tracker, pt 2 · Issue #16472 · python/mypy
X Title: Meta issue tracker, pt 2 · Issue #16472 · python/mypy
Description: This is the sequel to #11201. It's awesome to see most of the things in that issue fixed. Type System Features PEP 695 #15238 PEP 702 #16111 PEP 675 #12554 PEP 696 #14851 Behaviour changes Ternary unions #12056 We should use unions in so...
Open Graph Description: This is the sequel to #11201. It's awesome to see most of the things in that issue fixed. Type System Features PEP 695 #15238 PEP 702 #16111 PEP 675 #12554 PEP 696 #14851 Behaviour changes Ternary ...
X Description: This is the sequel to #11201. It's awesome to see most of the things in that issue fixed. Type System Features PEP 695 #15238 PEP 702 #16111 PEP 675 #12554 PEP 696 #14851 Behaviour changes Tern...
Opengraph URL: https://github.com/python/mypy/issues/16472
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Meta issue tracker, pt 2","articleBody":"This is the sequel to https://github.com/python/mypy/issues/11201. It's awesome to see most of the things in that issue fixed.\n\n### Type System Features\n\n- ~**PEP 695** https://github.com/python/mypy/issues/15238~\n- ~**PEP 702** https://github.com/python/mypy/issues/16111~\n- **PEP 675** https://github.com/python/mypy/issues/12554\n- ~**PEP 696** https://github.com/python/mypy/issues/14851~\n\n### Behaviour changes\n\n- ~**Ternary unions** https://github.com/python/mypy/issues/12056~\n\n We should use unions in some places we currently join, see https://github.com/python/mypy/issues/12056#issuecomment-1694422734\n\n Update: We now use unions in more places, including ternary expressions. Feel free to investigate this more though!\n\n- **Always narrow types** https://github.com/python/mypy/issues/2008#issuecomment-296213676 (proposal 3)\n\n Users find it surprising because it seems obvious that mypy should know the variable is of the narrower type. There was a big discussion in typing-sig and all the type checkers agreed this behaviour was probably the best. The change is very easy, but exposes bugs in binder\n\n- **Default value of generic parameters** https://github.com/python/mypy/issues/3737#issuecomment-552840010\n\n It's totally reasonable to want to have generic parameters with defaults, we should error at call sites in case of badness\n\n- **Support narrowing Literal** https://github.com/python/mypy/issues/12535\n\n It's hard to really use Literal types without a good way to narrow them. We should also narrow on `==`. I think last time I tried this it exposed bugs in binder\n\n- ~**Support property setters with broader types** https://github.com/python/mypy/issues/3004~\n\n Should also allow covariant overrides of getter\n\n- ~**Better handling of `__new__`** https://github.com/python/mypy/pull/16020~\n\n This is part of the Python language and comes up weirdly frequently. \n\n- ~**Love for match statement** https://github.com/python/mypy/issues?q=is%3Aopen+label%3Atopic-match-statement+sort%3Areactions-%2B1-desc~\n\n Update: I fixed the most popular of these issues, but there's still a long tail of them\n\n- ~**PEP 688** https://github.com/python/mypy/issues/15313~\n\n Easy, is just a somewhat breaking change\n\n### UI\n\n- **Per module strict=true** https://github.com/python/mypy/issues/11401\n\n There's maybe some other UI stuff we can think about for groups of flags and error codes, as discussed in meetup. I also don't like the new `--extra-checks` since flag name doesn't mean anything and can't be decomposed.\n\n- ~**Ability to override PEP 561** https://github.com/python/mypy/issues/8545~\n\n It would be nice to be able to opt-in to treating packages missing py.typed as having py.typed. mypy can still provide a lot of value just based on function shape.\n\n Update: this is now `--follow-untyped-imports` (can be set per-module)\n\n- **Exclude should imply per-module follow_import=skip** https://github.com/python/mypy/issues/10377\n\n Currently `--exclude` only affects file discovery on command line, not import following. This is a source of frustration for users because the relevant modules can still end up being type checked.\n\n- **Provide flag to generate stubs requirements** https://github.com/python/mypy/issues/10600#issuecomment-950170169\n\n `--install-types` is slow, results in unstable type checking, doesn't let users manage their own envs, can fail unclearly if cache isn't written\n\n- **Rethink stub suggestion logic** https://github.com/python/mypy/issues/10619\n\n Our current behaviour was needed to help the migration to modular typeshed, but is not behaviour we'd have designed from scratch.\n\n### Gradual typing\n\n- **Make `check_untyped_defs = True` the default** https://github.com/python/mypy/issues/3948#issuecomment-890060233 / https://github.com/python/mypy/issues/6646\n\n We decided not to do this for mypy 1.0, but could still make sense in the future.\n It could make sense to investigate and introduce other changes that make this more palatable, e.g. enable `--allow-redefinition(-new)`, swallow var-annotated in untyped defs, etc\n\n- **Infer obvious return types** https://github.com/python/mypy/issues/4409 / https://github.com/python/mypy/issues/10149\n\n As a 1/3-way measure, we could also do https://github.com/python/mypy/issues/9413\n\n- **Infer method types from superclass** https://github.com/python/mypy/issues/3903#issuecomment-408833797\n\n### Performance\n\n- ~**Parallel type checking** https://github.com/python/mypy/issues/933~\n- ~**Faster caching** https://github.com/python/mypy/issues/3456~\n\n### Misc\n\n- ~**Member access** https://github.com/python/mypy/issues/7724~\n\n- **Merge configuration docs** https://github.com/python/mypy/issues/12347\n\n\nSee also a similar issue for mypyc here: https://github.com/mypyc/mypyc/issues/785\n\n(other maintainers, feel free to edit)","author":{"url":"https://github.com/hauntsaninja","@type":"Person","name":"hauntsaninja"},"datePublished":"2023-11-12T22:57:27Z","url":"https://github.com/python/mypy/issues/16472"}
| 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:36057534-36b4-7a5a-6bfa-c115f14ac537 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E210:145630:2C32538:3A5D448:6B001CA3 |
| html-safe-nonce | d1cf4e523cab0cef2c0f292f5dd1207378c061951b2e6331e85e03e480dd1d0e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMjEwOjE0NTYzMDoyQzMyNTM4OjNBNUQ0NDg6NkIwMDFDQTMiLCJ2aXNpdG9yX2lkIjoiNzcyMTE4Njg5MDIwMzc5ODY5MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e42f3f09aa2e330c9dfbd6fa3623ee0b4eb2129f355a4724e58fe790ed807e66 |
| hovercard-subject-tag | issue:1989622155 |
| 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/16472/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e65a62f633872a32a0c29c0e04b4a1d629e39e1b3df601326d57d8ef59353c9c/python/mypy/issues/16472 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e65a62f633872a32a0c29c0e04b4a1d629e39e1b3df601326d57d8ef59353c9c/python/mypy/issues/16472 |
| og:image:alt | This is the sequel to #11201. It's awesome to see most of the things in that issue fixed. Type System Features PEP 695 #15238 PEP 702 #16111 PEP 675 #12554 PEP 696 #14851 Behaviour changes Ternary ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | hauntsaninja |
| 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