Title: Replace `: Incomplete | None = None` with `=None`? · Issue #14029 · python/typeshed · GitHub
Open Graph Title: Replace `: Incomplete | None = None` with `=None`? · Issue #14029 · python/typeshed
X Title: Replace `: Incomplete | None = None` with `=None`? · Issue #14029 · python/typeshed
Description: From #14027 The form Incomplete | None = None is basically a holdover from before we included defaults in stubs, where Incomplete | None = ... provided extra information. In #14027 @Avasam wrote: This is still interpreted as Any | None b...
Open Graph Description: From #14027 The form Incomplete | None = None is basically a holdover from before we included defaults in stubs, where Incomplete | None = ... provided extra information. In #14027 @Avasam wrote: T...
X Description: From #14027 The form Incomplete | None = None is basically a holdover from before we included defaults in stubs, where Incomplete | None = ... provided extra information. In #14027 @Avasam wrote: T...
Opengraph URL: https://github.com/python/typeshed/issues/14029
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Replace `: Incomplete | None = None` with `=None`?","articleBody":"From #14027\n\nThe form `Incomplete | None = None` is basically a holdover from before we included defaults in stubs, where `Incomplete | None = ...` provided extra information.\n\nIn #14027 @Avasam wrote:\n\n> This is still interpreted as `Any | None` by mypy. And now more correctly interpreted as `Unknown | None` by pyright.\n\n`Unknown | None` instead of `Any | None` sounds like this would be worth it alone. I also like that this form would be more succinct, while being quite obvious.\n\n@Avasam also wrote:\n\n> Some stubs might also use it in select places specifically to pass `pyrightconfig.stricter.json`\n\nThis is something we need to look out for, but is - in my opinion - not a valid reason not to do this. Marking something as \"strict\" when it's using `Incomplete` is cheating anyway, and we don't allow bare `Incomplete` statements.\n\nWhatever we decide, we should enforce the style using flake8-pyi.\n\nIf we change this, we should also ask mypy to change stubgen to follow this style.","author":{"url":"https://github.com/srittau","@type":"Person","name":"srittau"},"datePublished":"2025-05-12T17:41:36Z","url":"https://github.com/python/typeshed/issues/14029"}
| 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:d373fa22-96f4-a4eb-bdc9-ce338113b565 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C24E:194E10:5D6519:7E7DA1:6AFF88BC |
| html-safe-nonce | 2a65360d7ab639e0a9e2a4edd5e81a307cb2ac1c3e5130326f2f635f2a9a8f42 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMjRFOjE5NEUxMDo1RDY1MTk6N0U3REExOjZBRkY4OEJDIiwidmlzaXRvcl9pZCI6IjEzOTI4ODgzNjg2ODA4OTY3MDAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a08e0d20c626ec6d387cfebe67247d254c30d4747b0403e4f53f73f7c1fb6868 |
| hovercard-subject-tag | issue:3057681178 |
| 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/typeshed/14029/issue_layout |
| twitter:image | https://opengraph.githubassets.com/44cff1e13fd69ccec0a164a58a85bf8fb84234943832177f4625b9960cd4323d/python/typeshed/issues/14029 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/44cff1e13fd69ccec0a164a58a85bf8fb84234943832177f4625b9960cd4323d/python/typeshed/issues/14029 |
| og:image:alt | From #14027 The form Incomplete | None = None is basically a holdover from before we included defaults in stubs, where Incomplete | None = ... provided extra information. In #14027 @Avasam wrote: T... |
| 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 | 587ad99a3e443b2e1cb0d3df059ec49ab54389861f13310766dfdeb615fed90d |
| turbo-cache-control | no-preview |
| go-import | github.com/python/typeshed git https://github.com/python/typeshed.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 31696383 |
| octolytics-dimension-repository_nwo | python/typeshed |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31696383 |
| octolytics-dimension-repository_network_root_nwo | python/typeshed |
| 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 | 5bb0fb68d64881d1344f5863d809515d496801e5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width