René's URL Explorer Experiment


Title: Fix for #1698 by dmoisset · Pull Request #1989 · python/mypy · GitHub

Open Graph Title: Fix for #1698 by dmoisset · Pull Request #1989 · python/mypy

X Title: Fix for #1698 by dmoisset · Pull Request #1989 · python/mypy

Description: Optional static typing for Python. Contribute to python/mypy development by creating an account on GitHub.

Open Graph Description: This is an implementation of my proposed fix for #1698 ( #1698 (comment) ) Relevant differences from the description there: After the suggestion from @ddfisher I used class attributes in Type inst...

X Description: This is an implementation of my proposed fix for #1698 ( #1698 (comment) ) Relevant differences from the description there: After the suggestion from @ddfisher I used class attributes in Type inst...

Mail addresses
notifications@github.com

Opengraph URL: https://github.com/python/mypy/pull/1989

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,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-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:0eb41a2e-07af-a977-604a-e8573211ff50
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC9D8:144E47:2C5D679:3A5F222:6B0016C4
html-safe-nonce578cfa47a194505a4deaace026ec92fb6b080f24e503c4e8c983fafa6264d711
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOUQ4OjE0NEU0NzoyQzVENjc5OjNBNUYyMjI6NkIwMDE2QzQiLCJ2aXNpdG9yX2lkIjoiODg4NDg5MjYxOTYwNDIzNTk3MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac2e4efe9ed90a0343e79f396dc32cfe9e49fef25bae5a24c70fe55305508b1677
hovercard-subject-tagpull_request:80279748
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/python/mypy/1989/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/dee5928f4082baea06eed6be59d97a95d92ee2c3dc6aba938a05357e38fce7e1/python/mypy/pull/1989
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/dee5928f4082baea06eed6be59d97a95d92ee2c3dc6aba938a05357e38fce7e1/python/mypy/pull/1989
og:image:altThis is an implementation of my proposed fix for #1698 ( #1698 (comment) ) Relevant differences from the description there: After the suggestion from @ddfisher I used class attributes in Type inst...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedmoisset
hostnamegithub.com
expected-hostnamegithub.com
Nonea2dd2291b1b13cc9c06f27ec92fa3dbaf34116fc24c9347b8539db61884c59f4
turbo-cache-controlno-cache
go-importgithub.com/python/mypy git https://github.com/python/mypy.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id7053637
octolytics-dimension-repository_nwopython/mypy
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id7053637
octolytics-dimension-repository_network_root_nwopython/mypy
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release70121d4e855ee0bb7b75cf15d061d91f8863c0f8
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/python/mypy/pull/1989#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F1989
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F1989
Sign uphttps://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
Reloadhttps://github.com/python/mypy/pull/1989
Reloadhttps://github.com/python/mypy/pull/1989
Reloadhttps://github.com/python/mypy/pull/1989
pythonhttps://github.com/python
mypyhttps://github.com/python/mypy
Codehttps://github.com/python/mypy
Issues2.7k (2.7k)https://github.com/python/mypy/issues
Pull requests546 (546)https://github.com/python/mypy/pulls
Actionshttps://github.com/python/mypy/actions
Projectshttps://github.com/python/mypy/projects
Wikihttps://github.com/python/mypy/wiki
Security and qualityhttps://github.com/python/mypy/security
Insightshttps://github.com/python/mypy/insights
https://github.com/python/mypy
ddfisherhttps://github.com/ddfisher
python:masterhttps://github.com/python/mypy/tree/master
dmoisset:fix1698https://github.com/dmoisset/mypy/tree/fix1698
Conversationhttps://github.com/python/mypy/pull/1989
Commits15 (15)https://github.com/python/mypy/pull/1989/commits
Checkshttps://github.com/python/mypy/pull/1989/checks
Files changedhttps://github.com/python/mypy/pull/1989/files
Fix for #1698https://github.com/python/mypy/pull/1989#top
ddfisherhttps://github.com/ddfisher
python:masterhttps://github.com/python/mypy/tree/master
dmoisset:fix1698https://github.com/dmoisset/mypy/tree/fix1698
https://github.com/dmoisset
dmoissethttps://github.com/dmoisset
Aug 5, 2016https://github.com/python/mypy/pull/1989#issue-169658349
#1698https://github.com/python/mypy/issues/1698
#1698 (comment)https://github.com/python/mypy/issues/1698#issuecomment-233709981
@ddfisherhttps://github.com/ddfisher
Please reload this pagehttps://github.com/python/mypy/pull/1989
dmoissethttps://github.com/dmoisset
August 5, 2016 18:10https://github.com/python/mypy/pull/1989#commits-pushed-a34af88
https://github.com/dmoisset
Add initial definitions for can_be_true/true_only (and duals)https://github.com/python/mypy/pull/1989/commits/a34af88a140d3ce670ed4545ce639f8f24970fa5
a34af88https://github.com/python/mypy/pull/1989/commits/a34af88a140d3ce670ed4545ce639f8f24970fa5
https://github.com/dmoisset
Test for the changes in the last commithttps://github.com/python/mypy/pull/1989/commits/b9291c4a569dffc23b9032674e0b5faf912e8f4c
b9291c4https://github.com/python/mypy/pull/1989/commits/b9291c4a569dffc23b9032674e0b5faf912e8f4c
https://github.com/dmoisset
Make find_isinstance_check on RefExpr use true_only/false_onlyhttps://github.com/python/mypy/pull/1989/commits/317140be1cb8e9d6e100a48b2343191b36bfec29
317140bhttps://github.com/python/mypy/pull/1989/commits/317140be1cb8e9d6e100a48b2343191b36bfec29
https://github.com/dmoisset
Fix return type of find_isinstance_check, make tests pass againhttps://github.com/python/mypy/pull/1989/commits/2c715049de55039aa7efb091fcd8474522cfca06
2c71504https://github.com/python/mypy/pull/1989/commits/2c715049de55039aa7efb091fcd8474522cfca06
https://github.com/dmoisset
Update rules for checking boolean binary operatorshttps://github.com/python/mypy/pull/1989/commits/6b0398382b78a7273787aa308ce3e4753264f6db
6b03983https://github.com/python/mypy/pull/1989/commits/6b0398382b78a7273787aa308ce3e4753264f6db
https://github.com/dmoisset
Add tests for type restrictions on ifhttps://github.com/python/mypy/pull/1989/commits/74ba9c5e6926ef3bfc05c0cd07a2ed4e9beaaaae
74ba9c5https://github.com/python/mypy/pull/1989/commits/74ba9c5e6926ef3bfc05c0cd07a2ed4e9beaaaae
https://github.com/dmoisset
Fix typohttps://github.com/python/mypy/pull/1989/commits/21ab34d4d8fb6b965b4cd39c008a9c48fa839da0
21ab34dhttps://github.com/python/mypy/pull/1989/commits/21ab34d4d8fb6b965b4cd39c008a9c48fa839da0
https://github.com/dmoisset
Modified tests with dead codehttps://github.com/python/mypy/pull/1989/commits/c70b0d26439bce7bdd3ada9c1407ec0e1e857fc5
c70b0d2https://github.com/python/mypy/pull/1989/commits/c70b0d26439bce7bdd3ada9c1407ec0e1e857fc5
https://github.com/dmoisset
Make unions truthiness awarehttps://github.com/python/mypy/pull/1989/commits/ce802814fe942ffcab027266f14aba9289bf71d8
ce80281https://github.com/python/mypy/pull/1989/commits/ce802814fe942ffcab027266f14aba9289bf71d8
https://github.com/dmoisset
Enable truthiness checks independently of --strict-optionalhttps://github.com/python/mypy/pull/1989/commits/19d0920d2f3a5561b12e79ad062a442116edbd40
19d0920https://github.com/python/mypy/pull/1989/commits/19d0920d2f3a5561b12e79ad062a442116edbd40
disambiguate booleans on conditions ("and" & "or" operators) #1698 https://github.com/python/mypy/issues/1698
type checking on boolean expressions #1871 https://github.com/python/mypy/issues/1871
inferred type of "(cond and a) or b" #1477 https://github.com/python/mypy/issues/1477
Consider making None a normal Instance type with --strict-optional #1847 https://github.com/python/mypy/issues/1847
https://github.com/ddfisher
ddfisherhttps://github.com/ddfisher
Aug 5, 2016https://github.com/python/mypy/pull/1989#issuecomment-237976303
Please reload this pagehttps://github.com/python/mypy/pull/1989
https://github.com/ddfisher
ddfisherhttps://github.com/ddfisher
Aug 5, 2016https://github.com/python/mypy/pull/1989#event-747213734
ddfisherhttps://github.com/ddfisher
Aug 13, 2016 https://github.com/python/mypy/pull/1989#discussion-diff-74676623
View reviewed changes https://github.com/python/mypy/pull/1989/files/19d0920d2f3a5561b12e79ad062a442116edbd40#diff-42eda644ce5003e33ea0766d7601fcfb4934ad106429abfe115954a1fccddd07
mypy/checkexpr.pyhttps://github.com/python/mypy/pull/1989/files#diff-42eda644ce5003e33ea0766d7601fcfb4934ad106429abfe115954a1fccddd07
ddfisherhttps://github.com/ddfisher
Aug 13, 2016https://github.com/python/mypy/pull/1989#discussion_r74676623
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/mypy/pull/1989
https://github.com/ddfisher
ddfisherhttps://github.com/ddfisher
Aug 13, 2016https://github.com/python/mypy/pull/1989#issuecomment-239590204
Please reload this pagehttps://github.com/python/mypy/pull/1989
https://github.com/dmoisset
dmoissethttps://github.com/dmoisset
Aug 16, 2016https://github.com/python/mypy/pull/1989#issuecomment-240125582
#1989 (comment)https://github.com/python/mypy/pull/1989#issuecomment-239590204
https://github.com/notifications/unsubscribe-auth/AAMQHaT8vwlAkFuuz-A50SOiBBIX_EXgks5qfRE9gaJpZM4Jd5oehttps://github.com/notifications/unsubscribe-auth/AAMQHaT8vwlAkFuuz-A50SOiBBIX_EXgks5qfRE9gaJpZM4Jd5oe
www.machinalis.comhttp://www.machinalis.com
@dmoissethttps://github.com/dmoisset
Please reload this pagehttps://github.com/python/mypy/pull/1989
dmoissethttps://github.com/dmoisset
August 16, 2016 17:33https://github.com/python/mypy/pull/1989#commits-pushed-9aa4799
https://github.com/dmoisset
Unrestrict truthiness when joining types with mixed truthinesshttps://github.com/python/mypy/pull/1989/commits/9aa4799d2a1b75967a0791e9dae7b42bb027d4dd
9aa4799https://github.com/python/mypy/pull/1989/commits/9aa4799d2a1b75967a0791e9dae7b42bb027d4dd
https://github.com/dmoisset
Apply improvements suggested byhttps://github.com/python/mypy/pull/1989/commits/e53c35572fc60388f1954e58f44639fdea65850b
@ddfisherhttps://github.com/ddfisher
in his reviewhttps://github.com/python/mypy/pull/1989/commits/e53c35572fc60388f1954e58f44639fdea65850b
e53c355https://github.com/python/mypy/pull/1989/commits/e53c35572fc60388f1954e58f44639fdea65850b
https://github.com/dmoisset
Merge remote-tracking branch 'origin/master' into fix1698https://github.com/python/mypy/pull/1989/commits/6026e66043dc3827ab2a695e76d5c6d190756432
6026e66https://github.com/python/mypy/pull/1989/commits/6026e66043dc3827ab2a695e76d5c6d190756432
https://github.com/dmoisset
dmoissethttps://github.com/dmoisset
force-pushedhttps://github.com/python/mypy/compare/a6d01e5558fb4f2f7dc0e9e968f832ecdeed4d84..6026e66043dc3827ab2a695e76d5c6d190756432
a6d01e5https://github.com/python/mypy/commit/a6d01e5558fb4f2f7dc0e9e968f832ecdeed4d84
6026e66https://github.com/python/mypy/commit/6026e66043dc3827ab2a695e76d5c6d190756432
Compare https://github.com/python/mypy/compare/a6d01e5558fb4f2f7dc0e9e968f832ecdeed4d84..6026e66043dc3827ab2a695e76d5c6d190756432
August 16, 2016 17:24https://github.com/python/mypy/pull/1989#event-757383169
https://github.com/dmoisset
dmoissethttps://github.com/dmoisset
Aug 16, 2016https://github.com/python/mypy/pull/1989#issuecomment-240176868
Please reload this pagehttps://github.com/python/mypy/pull/1989
ddfisherhttps://github.com/ddfisher
Aug 16, 2016 https://github.com/python/mypy/pull/1989#discussion-diff-75002438
View reviewed changes https://github.com/python/mypy/pull/1989/files/6026e66043dc3827ab2a695e76d5c6d190756432#diff-dc731faa017a06257ba26e3eacaf17e68a6078aeaf9755d1c06d917fe13ce457
mypy/join.pyhttps://github.com/python/mypy/pull/1989/files#diff-dc731faa017a06257ba26e3eacaf17e68a6078aeaf9755d1c06d917fe13ce457
ddfisherhttps://github.com/ddfisher
Aug 16, 2016https://github.com/python/mypy/pull/1989#discussion_r75002438
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/mypy/pull/1989
dmoissethttps://github.com/dmoisset
Aug 16, 2016https://github.com/python/mypy/pull/1989#discussion_r75002908
Please reload this pagehttps://github.com/python/mypy/pull/1989
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/mypy/pull/1989
ddfisherhttps://github.com/ddfisher
Aug 16, 2016https://github.com/python/mypy/pull/1989#discussion_r75005256
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/mypy/pull/1989
https://github.com/ddfisher
ddfisherhttps://github.com/ddfisher
Aug 16, 2016https://github.com/python/mypy/pull/1989#issuecomment-240210429
Please reload this pagehttps://github.com/python/mypy/pull/1989
dmoissethttps://github.com/dmoisset
August 16, 2016 20:47https://github.com/python/mypy/pull/1989#commits-pushed-8053579
https://github.com/dmoisset
Also check join_types for mixed truthinesshttps://github.com/python/mypy/pull/1989/commits/805357942014d330a81e0542d15afdb8bd49e0dd
8053579https://github.com/python/mypy/pull/1989/commits/805357942014d330a81e0542d15afdb8bd49e0dd
https://github.com/dmoisset
Simplify true_only as suggested byhttps://github.com/python/mypy/pull/1989/commits/b364cdbcb3c1c2db9765dd55f2b835b26d0aae18
@ddfisherhttps://github.com/ddfisher
b364cdbhttps://github.com/python/mypy/pull/1989/commits/b364cdbcb3c1c2db9765dd55f2b835b26d0aae18
https://github.com/dmoisset
dmoissethttps://github.com/dmoisset
Aug 16, 2016https://github.com/python/mypy/pull/1989#issuecomment-240219142
Please reload this pagehttps://github.com/python/mypy/pull/1989
https://github.com/ddfisher
ddfisherhttps://github.com/ddfisher
Aug 16, 2016https://github.com/python/mypy/pull/1989#issuecomment-240270309
Please reload this pagehttps://github.com/python/mypy/pull/1989
https://github.com/ddfisher
ddfisherhttps://github.com/ddfisher
9a8a8c0https://github.com/python/mypy/commit/9a8a8c098a592cccc87473019b29f56a5db9c7cb
Aug 16, 2016https://github.com/python/mypy/pull/1989#event-757823158
https://github.com/ddfisher
ddfisherhttps://github.com/ddfisher
Aug 17, 2016 https://github.com/python/mypy/pull/1989#ref-issue-171548775
Processing of Callables in make_simplified_union is order dependent #2031 https://github.com/python/mypy/issues/2031
https://github.com/dmoisset
dmoissethttps://github.com/dmoisset
August 18, 2016 11:27https://github.com/python/mypy/pull/1989#event-759772954
https://github.com/ddfisher
ddfisherhttps://github.com/ddfisher
Aug 18, 2016 https://github.com/python/mypy/pull/1989#ref-pullrequest-162356532
Use information from find_isinstance_check in short-circuit case too #1751 https://github.com/python/mypy/pull/1751
https://github.co/hiddenchars
https://github.com/python/mypy/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fpull%2F1989
Please reload this pagehttps://github.com/python/mypy/pull/1989
https://github.com/ddfisher
ddfisher https://github.com/ddfisher
Please reload this pagehttps://github.com/python/mypy/pull/1989
https://github.com/dmoisset
https://github.com/ddfisher
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.