Title: Fix UnsetType truthiness narrowing in type stubs by overlorde · Pull Request #975 · msgspec/msgspec · GitHub
Open Graph Title: Fix UnsetType truthiness narrowing in type stubs by overlorde · Pull Request #975 · msgspec/msgspec
X Title: Fix UnsetType truthiness narrowing in type stubs by overlorde · Pull Request #975 · msgspec/msgspec
Description: A fast serialization and validation library, with builtin support for JSON, MessagePack, YAML, and TOML - Fix UnsetType truthiness narrowing in type stubs by overlorde · Pull Request #975 · msgspec/msgspec
Open Graph Description: Summary Add __bool__() -> Literal[False] to UnsetType stub so type checkers can narrow T | UnsetType via truthiness (if x:) Add typing test for truthiness-based narrowing Closes #916
X Description: Summary Add __bool__() -> Literal[False] to UnsetType stub so type checkers can narrow T | UnsetType via truthiness (if x:) Add typing test for truthiness-based narrowing Closes #916
Opengraph URL: https://github.com/msgspec/msgspec/pull/975
X: @github
Domain: github.com
| route-pattern | /_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format) |
| route-controller | voltron_pull_requests_fragments |
| route-action | pull_request_layout |
| fetch-nonce | v2:8779878f-be34-67bc-d895-68d1235292b1 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | BA7E:18C74D:12C0016:1992378:6A4D6E4C |
| html-safe-nonce | 7ae2773c3230bfcb1d7e24057bcf145ad8e3f774648d56fb020aa487447215a7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQTdFOjE4Qzc0RDoxMkMwMDE2OjE5OTIzNzg6NkE0RDZFNEMiLCJ2aXNpdG9yX2lkIjoiMjEzMDQ2MDgzODk2MzUzOTUzMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5c7f74769f58919f91f6ed78925d6f7c76e4379291ea06e14d7cac214c93624d |
| hovercard-subject-tag | pull_request:3265779248 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/voltron/pull_requests/show/msgspec/msgspec/975/pull_request_layout |
| twitter:image | https://opengraph.githubassets.com/9c7fd6d013ff00965f1281124fcfb179a39c0cbf992f959c172929bba42921b3/msgspec/msgspec/pull/975 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9c7fd6d013ff00965f1281124fcfb179a39c0cbf992f959c172929bba42921b3/msgspec/msgspec/pull/975 |
| og:image:alt | Summary Add __bool__() -> Literal[False] to UnsetType stub so type checkers can narrow T | UnsetType via truthiness (if x:) Add typing test for truthiness-based narrowing Closes #916 |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | overlorde |
| hostname | github.com |
| expected-hostname | github.com |
| None | c78260c7b3f4ac4b0356c8208537f05406a3a2d46a9ec3f735b372dcc519c39e |
| turbo-cache-control | no-cache |
| go-import | github.com/msgspec/msgspec git https://github.com/msgspec/msgspec.git |
| octolytics-dimension-user_id | 287455683 |
| octolytics-dimension-user_login | msgspec |
| octolytics-dimension-repository_id | 332952543 |
| octolytics-dimension-repository_nwo | msgspec/msgspec |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 332952543 |
| octolytics-dimension-repository_network_root_nwo | msgspec/msgspec |
| 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 | 399fff412f48461d435721c009efc17ea44be72f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width