| 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/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:d0ae42da-34de-a475-b269-aeca21e79161 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A3DC:1A12A9:BA590B:F85632:6B004D41 |
| html-safe-nonce | ffc4cb3c7a8b45a9502b40d7414201262d0e38486be571cbc0d83118cde6154e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBM0RDOjFBMTJBOTpCQTU5MEI6Rjg1NjMyOjZCMDA0RDQxIiwidmlzaXRvcl9pZCI6IjUyNzg3MzM4NTE5MTEyNzc4ODkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 64ac250b65f897b278aaad65c62edc925777d65d2e385e8668efa2af71dc40e5 |
| hovercard-subject-tag | pull_request:627367350 |
| 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 | ///voltron/pull_requests_fragments/pull_request_layout |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/python/mypy/10389/pull_request_layout |
| twitter:image | https://opengraph.githubassets.com/fd5b2559149b3a7602e8fb41924de0fce293dd66da95fb5125ca3fae10b6822f/python/mypy/pull/10389 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fd5b2559149b3a7602e8fb41924de0fce293dd66da95fb5125ca3fae10b6822f/python/mypy/pull/10389 |
| og:image:alt | Description
This PR allows boolean types to be narrowed to literals, in the same fashion
that Enums can be narrowed.
Closes #6113, closes #11043
Test Plan
New unit tests included! |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ethan-leba |
| hostname | github.com |
| expected-hostname | github.com |
| None | f9517bf360d46638a1e5e7daee7158842fe5ef43c9000afa0e127564a7c2f39b |
| turbo-cache-control | no-cache |
| 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 | b27c5dde30676028abd5c5fc53ce5c9b625f8281 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | pull-requests |
| Skip to content | https://github.com/python/mypy/pull/10389#start-of-content |
| https://github.com/ |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F10389 |
| GitHubRepository hosting, code review, and collaboration | https://github.com/platform |
| CopilotAI coding agent for tasks, projects, and automated work | https://github.com/features/copilot |
| ActionsCI/CD and automation | https://github.com/features/actions |
| Code QualityQuality analysis, fixes, and enforcement | https://github.com/features/code-quality |
| CodespacesCloud development environments | https://github.com/features/codespaces |
| Code SecurityVulnerability detection and remediation | https://github.com/security/advanced-security/code-security |
| Secret ProtectionSecret scanning and leak prevention | https://github.com/security/advanced-security/secret-protection |
| All Features | https://github.com/features |
| Documentation | https://docs.github.com/en |
| Training | https://learn.github.com/skills |
| Certifications | https://learn.github.com/credentials |
| Build with Copilot | https://github.com/features/ai |
| Customize Copilot | https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview |
| Integrations | https://github.com/marketplace |
| Trending repos | https://github.com/trending |
| GitHub Sponsors | https://github.com/open-source/sponsors |
| Developer articles | https://github.com/resources/articles |
| ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place. | https://github.blog/changelog/ |
| Enterprises | https://github.com/enterprise |
| Team | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| See all industries | https://github.com/solutions/industry |
| Why GitHub | https://github.com/why-github |
| Customer Stories | https://github.com/customer-stories |
| Business insights | https://github.com/solutions/executive-insights |
| Trust Center | https://github.com/trust-center |
| GitHub Advanced SecurityEnterprise-grade code security | https://github.com/security/advanced-security |
| Copilot for businessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/enterprise/premium-support |
| Documentation | https://docs.github.com/en |
| Resource center | https://github.com/resources |
| Blog | https://github.blog/ |
| Events & webinars | https://github.com/resources/events |
| Community Forum | https://github.com/orgs/community/discussions |
| Customer Stories | https://github.com/customer-stories |
| Integrations | https://github.com/marketplace |
| Customer support | https://help.github.com/ |
| Training | https://learn.github.com/skills |
| GitHub Status | https://www.githubstatus.com/ |
| About | https://github.com/about |
| Partners | https://github.com/partners |
| Changelog | https://github.blog/changelog/ |
| GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub. | https://githubuniverse.com/ |
| Pricing | https://github.com/pricing |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F10389 |
| Sign up | https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=python%2Fmypy |
| Reload | https://github.com/python/mypy/pull/10389 |
| Reload | https://github.com/python/mypy/pull/10389 |
| Reload | https://github.com/python/mypy/pull/10389 |
| python | https://github.com/python |
| mypy | https://github.com/python/mypy |
| Code | https://github.com/python/mypy |
| Issues2.7k (2.7k) | https://github.com/python/mypy/issues |
| Pull requests546 (546) | https://github.com/python/mypy/pulls |
| Actions | https://github.com/python/mypy/actions |
| Projects | https://github.com/python/mypy/projects |
| Wiki | https://github.com/python/mypy/wiki |
| Security and quality | https://github.com/python/mypy/security |
| Insights | https://github.com/python/mypy/insights |
| https://github.com/python/mypy |
| hauntsaninja | https://github.com/hauntsaninja |
| python:master | https://github.com/python/mypy/tree/master |
| ethan-leba:boolean-narrowing | https://github.com/ethan-leba/mypy/tree/boolean-narrowing |
| Conversation | https://github.com/python/mypy/pull/10389 |
| Commits8 (8) | https://github.com/python/mypy/pull/10389/commits |
| Checks | https://github.com/python/mypy/pull/10389/checks |
| Files changed | https://github.com/python/mypy/pull/10389/files |
| Allow booleans to be narrowed to literal types | https://github.com/python/mypy/pull/10389#top |
| hauntsaninja | https://github.com/hauntsaninja |
| python:master | https://github.com/python/mypy/tree/master |
| ethan-leba:boolean-narrowing | https://github.com/ethan-leba/mypy/tree/boolean-narrowing |
|
| https://github.com/ethan-leba |
| ethan-leba | https://github.com/ethan-leba |
| Apr 30, 2021 | https://github.com/python/mypy/pull/10389#issue-872462107 |
| Please reload this page | https://github.com/python/mypy/pull/10389 |
| #6113 | https://github.com/python/mypy/issues/6113 |
| #11043 | https://github.com/python/mypy/issues/11043 |
| Please reload this page | https://github.com/python/mypy/pull/10389 |
| https://github.com/ethan-leba |
| ethan-leba | https://github.com/ethan-leba |
| Apr 30, 2021 | https://github.com/python/mypy/pull/10389#event-4669206912 |
| https://github.com/apps/github-actions |
| Sign in to view | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F10389 |
| https://github.com/ethan-leba |
| ethan-leba | https://github.com/ethan-leba |
| April 30, 2021 13:45 | https://github.com/python/mypy/pull/10389#event-4669493176 |
| https://github.com/ethan-leba |
| ethan-leba | https://github.com/ethan-leba |
|
Apr 30, 2021
| https://github.com/python/mypy/pull/10389#pullrequestreview-649237704 |
|
View reviewed changes
| https://github.com/python/mypy/pull/10389/files |
| mypy/checker.py | https://github.com/python/mypy/pull/10389/files#diff-f96a2d6138bc6cdf2a07c4d37f6071cc25c1631afc107e277a28d5b59fc0ef04 |
| ethan-leba | https://github.com/ethan-leba |
| Apr 30, 2021 | https://github.com/python/mypy/pull/10389#discussion_r623894063 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/python/mypy/pull/10389 |
| JukkaL | https://github.com/JukkaL |
| May 5, 2021 | https://github.com/python/mypy/pull/10389#discussion_r626671650 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/python/mypy/pull/10389 |
| https://github.com/JukkaL |
| JukkaL | https://github.com/JukkaL |
|
May 5, 2021
| https://github.com/python/mypy/pull/10389#pullrequestreview-652451792 |
|
View reviewed changes
| https://github.com/python/mypy/pull/10389/files |
| JukkaL | https://github.com/JukkaL |
| https://github.com/python/mypy/pull/10389#pullrequestreview-652451792 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/python/mypy/pull/10389 |
| test-data/unit/check-narrowing.test | https://github.com/python/mypy/pull/10389/files#diff-0413401ad6a91bc5c66579455009ba606ee0ddfb0a78278c9e53618c83b53ed5 |
| JukkaL | https://github.com/JukkaL |
| May 5, 2021 | https://github.com/python/mypy/pull/10389#discussion_r626672995 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/python/mypy/pull/10389 |
| ethan-leba | https://github.com/ethan-leba |
| May 6, 2021 | https://github.com/python/mypy/pull/10389#discussion_r627397469 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/python/mypy/pull/10389 |
| https://github.com/ethan-leba |
| ethan-leba | https://github.com/ethan-leba |
| force-pushed | https://github.com/python/mypy/compare/6bd339bae8d93e22cd28f32f206ce6717ce73f0c..49537ef5e9f0ba2016a83edf50e3c00029084330 |
| 6bd339b | https://github.com/python/mypy/commit/6bd339bae8d93e22cd28f32f206ce6717ce73f0c |
| 49537ef | https://github.com/python/mypy/commit/49537ef5e9f0ba2016a83edf50e3c00029084330 |
|
Compare
| https://github.com/python/mypy/compare/6bd339bae8d93e22cd28f32f206ce6717ce73f0c..49537ef5e9f0ba2016a83edf50e3c00029084330 |
| May 6, 2021 15:54 | https://github.com/python/mypy/pull/10389#event-4696110403 |
| https://github.com/apps/github-actions |
| Sign in to view | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F10389 |
| https://github.com/JelleZijlstra |
| JelleZijlstra | https://github.com/JelleZijlstra |
| May 6, 2021 | https://github.com/python/mypy/pull/10389#issuecomment-833679634 |
| https://github.com/home-assistant/core/blob/dev/homeassistant/config_entries.py#L403 | https://github.com/home-assistant/core/blob/dev/homeassistant/config_entries.py#L403 |
| Please reload this page | https://github.com/python/mypy/pull/10389 |
| https://github.com/ethan-leba |
| Sign in to view | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F10389 |
| https://github.com/ethan-leba |
| ethan-leba | https://github.com/ethan-leba |
| May 9, 2021 | https://github.com/python/mypy/pull/10389#issuecomment-835805544 |
| https://github.com/home-assistant/core/blob/dev/homeassistant/config_entries.py#L403 | https://github.com/home-assistant/core/blob/dev/homeassistant/config_entries.py#L403 |
| https://github.com/python/mypy/blob/master/mypy/binder.py#L201 | https://github.com/python/mypy/blob/master/mypy/binder.py#L201 |
| Please reload this page | https://github.com/python/mypy/pull/10389 |
| https://github.com/ethan-leba |
| ethan-leba | https://github.com/ethan-leba |
| JukkaL | https://github.com/JukkaL |
| June 9, 2021 13:18 | https://github.com/python/mypy/pull/10389#event-4864983363 |
| ethan-leba | https://github.com/ethan-leba |
| August 6, 2021 09:51 | https://github.com/python/mypy/pull/10389#commits-pushed-ac3f313 |
|
| https://github.com/ethan-leba |
| Narrow booleans to literals with identity check | https://github.com/python/mypy/pull/10389/commits/ac3f31357f9fa316856f9a4d175d19763ff2ae58 |
| ac3f313 | https://github.com/python/mypy/pull/10389/commits/ac3f31357f9fa316856f9a4d175d19763ff2ae58 |
|
| https://github.com/ethan-leba |
| Rename expansion-related locals/functions | https://github.com/python/mypy/pull/10389/commits/9e7a695b308cb658d0c0cc0f09ab1f9f2bc62a43 |
| 9e7a695 | https://github.com/python/mypy/pull/10389/commits/9e7a695b308cb658d0c0cc0f09ab1f9f2bc62a43 |
| https://github.com/ethan-leba |
| ethan-leba | https://github.com/ethan-leba |
| force-pushed | https://github.com/python/mypy/compare/49537ef5e9f0ba2016a83edf50e3c00029084330..2a3255fc98425faa7eb0b40d704a2da0078b6e6e |
| 49537ef | https://github.com/python/mypy/commit/49537ef5e9f0ba2016a83edf50e3c00029084330 |
| 2a3255f | https://github.com/python/mypy/commit/2a3255fc98425faa7eb0b40d704a2da0078b6e6e |
|
Compare
| https://github.com/python/mypy/compare/49537ef5e9f0ba2016a83edf50e3c00029084330..2a3255fc98425faa7eb0b40d704a2da0078b6e6e |
| August 6, 2021 14:04 | https://github.com/python/mypy/pull/10389#event-5123092710 |
| https://github.com/apps/github-actions |
| Sign in to view | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F10389 |
|
| https://github.com/ethan-leba |
| Expand booleans during truthy checks and bool ops | https://github.com/python/mypy/pull/10389/commits/08467a166a426d6f6ba279802323f75cab46fc44 |
| 08467a1 | https://github.com/python/mypy/pull/10389/commits/08467a166a426d6f6ba279802323f75cab46fc44 |
| https://github.com/ethan-leba |
| ethan-leba | https://github.com/ethan-leba |
| force-pushed | https://github.com/python/mypy/compare/2a3255fc98425faa7eb0b40d704a2da0078b6e6e..08467a166a426d6f6ba279802323f75cab46fc44 |
| 2a3255f | https://github.com/python/mypy/commit/2a3255fc98425faa7eb0b40d704a2da0078b6e6e |
| 08467a1 | https://github.com/python/mypy/commit/08467a166a426d6f6ba279802323f75cab46fc44 |
|
Compare
| https://github.com/python/mypy/compare/2a3255fc98425faa7eb0b40d704a2da0078b6e6e..08467a166a426d6f6ba279802323f75cab46fc44 |
| August 7, 2021 13:16 | https://github.com/python/mypy/pull/10389#event-5125738442 |
| https://github.com/apps/github-actions |
| Sign in to view | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F10389 |
| https://github.com/ethan-leba |
| ethan-leba | https://github.com/ethan-leba |
| Aug 9, 2021 | https://github.com/python/mypy/pull/10389#issuecomment-895238846 |
| @JukkaL | https://github.com/JukkaL |
| Please reload this page | https://github.com/python/mypy/pull/10389 |
| https://github.com/bluetech |
| bluetech | https://github.com/bluetech |
|
Sep 26, 2021
| https://github.com/python/mypy/pull/10389#ref-pullrequest-1006724866 |
|
Better narrows bool in if statements
#11187
| https://github.com/python/mypy/pull/11187 |
|
| https://github.com/hauntsaninja |
| Merge branch 'master' into boolean-narrowing | https://github.com/python/mypy/pull/10389/commits/c973180b798649ebe11d52d2c19ae3ab267303b3 |
| c973180 | https://github.com/python/mypy/pull/10389/commits/c973180b798649ebe11d52d2c19ae3ab267303b3 |
| https://github.com/apps/github-actions |
| Sign in to view | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F10389 |
| https://github.com/ethan-leba |
| ethan-leba | https://github.com/ethan-leba |
| Sep 28, 2021 | https://github.com/python/mypy/pull/10389#issuecomment-929608473 |
| @hauntsaninja | https://github.com/hauntsaninja |
| Please reload this page | https://github.com/python/mypy/pull/10389 |
| September 28, 2021 22:21 | https://github.com/python/mypy/pull/10389#commits-pushed-2fe0e4c |
| fix tests | https://github.com/python/mypy/pull/10389/commits/2fe0e4c1d7c4facb269a9f600e3d0d0eeba3e876 |
| 2fe0e4c | https://github.com/python/mypy/pull/10389/commits/2fe0e4c1d7c4facb269a9f600e3d0d0eeba3e876 |
| Merge remote-tracking branch 'upstream/master' into boolean-narrowing | https://github.com/python/mypy/pull/10389/commits/a7110776d6e01eb1a96c95c8e777d5f9b701decf |
| a711077 | https://github.com/python/mypy/pull/10389/commits/a7110776d6e01eb1a96c95c8e777d5f9b701decf |
| https://github.com/hauntsaninja |
| hauntsaninja | https://github.com/hauntsaninja |
| Sep 29, 2021 | https://github.com/python/mypy/pull/10389#issuecomment-929847764 |
| Please reload this page | https://github.com/python/mypy/pull/10389 |
| @JukkaL | https://github.com/JukkaL |
| Please reload this page | https://github.com/python/mypy/pull/10389 |
| https://github.com/apps/github-actions |
| Sign in to view | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F10389 |
| fix my bad merge | https://github.com/python/mypy/pull/10389/commits/0143fe70dc99193a86a6a2307b90978892269687 |
| 0143fe7 | https://github.com/python/mypy/pull/10389/commits/0143fe70dc99193a86a6a2307b90978892269687 |
| https://github.com/apps/github-actions |
| Sign in to view | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F10389 |
| one more test | https://github.com/python/mypy/pull/10389/commits/55e96b4dcd7c5ef1317f77ccb5fbef662afe0bb3 |
| 55e96b4 | https://github.com/python/mypy/pull/10389/commits/55e96b4dcd7c5ef1317f77ccb5fbef662afe0bb3 |
| https://github.com/apps/github-actions |
| github-actions | https://github.com/apps/github-actions |
| Sep 29, 2021 | https://github.com/python/mypy/pull/10389#issuecomment-929876689 |
| mypy_primer | https://github.com/hauntsaninja/mypy_primer |
| Please reload this page | https://github.com/python/mypy/pull/10389 |
| https://github.com/hauntsaninja |
| hauntsaninja | https://github.com/hauntsaninja |
|
Oct 31, 2021
| https://github.com/python/mypy/pull/10389#ref-issue-985884128 |
|
Incompatible types: Union[bool, A] and Optional[A]
#11043
| https://github.com/python/mypy/issues/11043 |
| https://github.com/hauntsaninja |
| hauntsaninja | https://github.com/hauntsaninja |
|
Nov 7, 2021
| https://github.com/python/mypy/pull/10389#ref-issue-1042886196 |
|
Type narrowing after boolean exhaustion
#11435
| https://github.com/python/mypy/issues/11435 |
| https://github.com/hauntsaninja |
| hauntsaninja | https://github.com/hauntsaninja |
| d41e34a | https://github.com/python/mypy/commit/d41e34a0c518c181b341390b5d9097c0e5b696b7 |
| Nov 7, 2021 | https://github.com/python/mypy/pull/10389#event-5579503766 |
| https://github.com/hauntsaninja |
| hauntsaninja | https://github.com/hauntsaninja |
| Nov 7, 2021 | https://github.com/python/mypy/pull/10389#issuecomment-962676482 |
| Please reload this page | https://github.com/python/mypy/pull/10389 |
| https://github.com/cdce8p |
| cdce8p | https://github.com/cdce8p |
|
Nov 16, 2021
| https://github.com/python/mypy/pull/10389#ref-pullrequest-1054706723 |
|
Fix mypy warnings for astroid/rebuilder
pylint-dev/astroid#1244
| https://github.com/pylint-dev/astroid/pull/1244 |
|
Literal[True, False] false positives within tuples
#11701
| https://github.com/python/mypy/issues/11701 |
|
Type inference regression with "and" and strict optional disabled
#11705
| https://github.com/python/mypy/issues/11705 |
| https://github.com/cdce8p |
| cdce8p | https://github.com/cdce8p |
|
Dec 23, 2021
| https://github.com/python/mypy/pull/10389#ref-issue-1087872201 |
|
Regression with type narrowing of bool
#11839
| https://github.com/python/mypy/issues/11839 |
| https://github.com/sobolevn |
| sobolevn | https://github.com/sobolevn |
|
Dec 25, 2021
| https://github.com/python/mypy/pull/10389#ref-pullrequest-1088619521 |
|
Attempt to fix bool re-narrowing
#11845
| https://github.com/python/mypy/pull/11845 |
| https://github.com/pranavrajpal |
| pranavrajpal | https://github.com/pranavrajpal |
|
Dec 29, 2021
| https://github.com/python/mypy/pull/10389#ref-issue-1089534598 |
|
Incorrect errors caused by boolean narrowing on attributes
#11853
| https://github.com/python/mypy/issues/11853 |
| https://github.com/Dreamsorcerer |
| Dreamsorcerer | https://github.com/Dreamsorcerer |
| Dec 29, 2021 | https://github.com/python/mypy/pull/10389#issuecomment-1002576762 |
| Please reload this page | https://github.com/python/mypy/pull/10389 |
| tushar-deepsource | https://github.com/tushar-deepsource |
|
Jan 20, 2022
| https://github.com/python/mypy/pull/10389#ref-commit-bf4530e |
|
| https://github.com/ethan-leba |
|
| https://github.com/tushar-deepsource |
| Allow booleans to be narrowed to literal types ( | https://github.com/DeepSourceCorp/mypy/commit/bf4530ef606a7bf5d3a0310254e44d53a013b493 |
| python#10389 | https://github.com/python/mypy/pull/10389 |
| ) | https://github.com/DeepSourceCorp/mypy/commit/bf4530ef606a7bf5d3a0310254e44d53a013b493 |
| bf4530e | https://github.com/DeepSourceCorp/mypy/commit/bf4530ef606a7bf5d3a0310254e44d53a013b493 |
| https://github.co/hiddenchars |
| https://github.com/python/mypy/pull/{{ revealButtonHref }} |
| Sign up for free | https://github.com/join?source=comment-repo |
| Sign in to comment | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F10389 |
|
| https://github.com/JukkaL |
|
JukkaL
| https://github.com/JukkaL |
| Please reload this page | https://github.com/python/mypy/pull/10389 |
|
Incompatible types: Union[bool, A] and Optional[A]
| https://github.com/python/mypy/issues/11043 |
|
Treat bool as equivalent to Literal[True, False] to allow better type inference
| https://github.com/python/mypy/issues/6113 |
| Please reload this page | https://github.com/python/mypy/pull/10389 |
|
| https://github.com/ethan-leba |
|
| https://github.com/JelleZijlstra |
|
| https://github.com/hauntsaninja |
|
| https://github.com/Dreamsorcerer |
|
| https://github.com/JukkaL |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |