René's URL Explorer Experiment


Title: Catch TypeVisitor subclasses with unimplemented abstract methods · Issue #730 · python/mypy · GitHub

Open Graph Title: Catch TypeVisitor subclasses with unimplemented abstract methods · Issue #730 · python/mypy

X Title: Catch TypeVisitor subclasses with unimplemented abstract methods · Issue #730 · python/mypy

Description: Issue #638 was a pain to find because the root cause is an unimplemented abstract method which silently returns None and somewhere down the line causes type checking to fail. It would be better to check this explicitly. The following sho...

Open Graph Description: Issue #638 was a pain to find because the root cause is an unimplemented abstract method which silently returns None and somewhere down the line causes type checking to fail. It would be better to ...

X Description: Issue #638 was a pain to find because the root cause is an unimplemented abstract method which silently returns None and somewhere down the line causes type checking to fail. It would be better to ...

Opengraph URL: https://github.com/python/mypy/issues/730

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Catch TypeVisitor subclasses with unimplemented abstract methods","articleBody":"Issue #638 was a pain to find because the root cause is an unimplemented abstract method which silently returns `None` and somewhere down the line causes type checking to fail. It would be better to check this explicitly. The following shows that this is done for one of the abstract methods:\nhttps://github.com/JukkaL/mypy/blob/bbb2dd4f07f995a4b28b8044fa91aa97960fe192/mypy/types.py#L532. There are two potential solutions: 1) use abc's @abstractmethod decorator, 2) raise an error directly in TypeVisitor.\n\n1) Ensures that future implementations and changes catch subclasses which do not implement the abstract methods, but requires adding implementations for all of the abstract methods to existing subclasses which are missing them. As there are a few, it would probably be simplest to raise an error there instead of providing the complete implementation, which raises the question: why not just use 2) straight off the bat?\n\n@JukkaL Do you have a preferred solution?\n","author":{"url":"https://github.com/JamesGuthrie","@type":"Person","name":"JamesGuthrie"},"datePublished":"2015-07-27T12:29:58Z","url":"https://github.com/python/mypy/issues/730"}

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/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:7cc6ef7d-08ce-521e-bc94-5b47d6c562c0
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC5EA:3E7030:C6AFC2:10AD153:6B005288
html-safe-nonce1b41d2aa723d795a059c96071c9747089a1cb21fff4b34790164c995829e1431
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNUVBOjNFNzAzMDpDNkFGQzI6MTBBRDE1Mzo2QjAwNTI4OCIsInZpc2l0b3JfaWQiOiI4NTgyMjAxOTQ3NTYwMzY2NzI4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacf8754b5c363a2997e980703ebc029d8a9596c851f0f9143aaf8acd986d80b770
hovercard-subject-tagissue:97452227
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/mypy/730/issue_layout
twitter:imagehttps://opengraph.githubassets.com/566eb662ffa67c153be8f144330949a70e4746245537c85d56cbb73d6af134bf/python/mypy/issues/730
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/566eb662ffa67c153be8f144330949a70e4746245537c85d56cbb73d6af134bf/python/mypy/issues/730
og:image:altIssue #638 was a pain to find because the root cause is an unimplemented abstract method which silently returns None and somewhere down the line causes type checking to fail. It would be better to ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameJamesGuthrie
hostnamegithub.com
expected-hostnamegithub.com
Nonef420f4996e6b1ff1ccd6d7683f8134f4b5f0f8a50124c210dbfe7490e5644abb
turbo-cache-controlno-preview
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
release26e00df917aba0f128135dc073ea0c5e33a70d40
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/mypy/issues/730#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fissues%2F730
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%2Fissues%2F730
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%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fmypy
Reloadhttps://github.com/python/mypy/issues/730
Reloadhttps://github.com/python/mypy/issues/730
Reloadhttps://github.com/python/mypy/issues/730
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
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/730
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/730
#7312https://github.com/python/mypy/pull/7312
Catch TypeVisitor subclasses with unimplemented abstract methodshttps://github.com/python/mypy/issues/730#top
#7312https://github.com/python/mypy/pull/7312
bugmypy got something wronghttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22bug%22
false-positivemypy gave an error on correct codehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22false-positive%22
priority-1-normalhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-1-normal%22
https://github.com/JamesGuthrie
JamesGuthriehttps://github.com/JamesGuthrie
on Jul 27, 2015https://github.com/python/mypy/issues/730#issue-97452227
#638https://github.com/python/mypy/issues/638
https://github.com/JukkaL/mypy/blob/bbb2dd4f07f995a4b28b8044fa91aa97960fe192/mypy/types.py#L532https://github.com/JukkaL/mypy/blob/bbb2dd4f07f995a4b28b8044fa91aa97960fe192/mypy/types.py#L532
@AbstractMethodhttps://github.com/AbstractMethod
@JukkaLhttps://github.com/JukkaL
Nexthttps://github.com/python/mypy/issues/730?timeline_page=1
https://github.com/o11c
o11chttps://github.com/o11c
on Jul 27, 2015https://github.com/python/mypy/issues/730#issuecomment-125376340
https://github.com/JamesGuthrie
JamesGuthriehttps://github.com/JamesGuthrie
on Jul 28, 2015https://github.com/python/mypy/issues/730#issuecomment-125479250
JukkaLhttps://github.com/JukkaL
bugmypy got something wronghttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22bug%22
on Aug 4, 2015https://github.com/python/mypy/issues/730#event-372637772
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Aug 4, 2015https://github.com/python/mypy/issues/730#issuecomment-127464420
JamesGuthriehttps://github.com/JamesGuthrie
on Aug 4, 2015https://github.com/python/mypy/issues/730#event-372775822
Catch incomplete TypeVisitor implementationshttps://github.com/JamesGuthrie/mypy/commit/9df3a84f2fb9915b2108333725e63a634cccf3e4
9df3a84https://github.com/JamesGuthrie/mypy/commit/9df3a84f2fb9915b2108333725e63a634cccf3e4
https://github.com/JamesGuthrie
JamesGuthriehttps://github.com/JamesGuthrie
on Aug 4, 2015https://github.com/python/mypy/issues/730#issuecomment-127529754
JamesGuthriehttps://github.com/JamesGuthrie
on Aug 24, 2015https://github.com/python/mypy/issues/730#event-390739147
Catch incomplete TypeVisitor implementationshttps://github.com/JamesGuthrie/mypy/commit/1f83def62d96c020d7385593201762db7d55e6fb
1f83defhttps://github.com/JamesGuthrie/mypy/commit/1f83def62d96c020d7385593201762db7d55e6fb
Raise error on unimplemented abstract method callhttps://github.com/JamesGuthrie/mypy/commit/922543780f675f65b17f33ec29fae65ebf3dd9a2
9225437https://github.com/JamesGuthrie/mypy/commit/922543780f675f65b17f33ec29fae65ebf3dd9a2
Add SameTypeVisitor.visit_overloaded() implementationhttps://github.com/JamesGuthrie/mypy/commit/f4c5a9783794f0369638bf66edd526c94cbf1cee
f4c5a97https://github.com/JamesGuthrie/mypy/commit/f4c5a9783794f0369638bf66edd526c94cbf1cee
Add visit_overloaded() to TypeVisitor.https://github.com/JamesGuthrie/mypy/commit/89e5c0499d3d8d52829376075235ed18db4d0e24
89e5c04https://github.com/JamesGuthrie/mypy/commit/89e5c0499d3d8d52829376075235ed18db4d0e24
Add visit_overloaded to TypeQueryhttps://github.com/JamesGuthrie/mypy/commit/d8ef5f0829ce8813f71fff40cc8277ceb6dafd1c
d8ef5f0https://github.com/JamesGuthrie/mypy/commit/d8ef5f0829ce8813f71fff40cc8277ceb6dafd1c
add visit_star_type to TypeAnalyserPass3https://github.com/JamesGuthrie/mypy/commit/8cbf4d2c50ad9aaba09dd77494e75321ec214ed8
8cbf4d2https://github.com/JamesGuthrie/mypy/commit/8cbf4d2c50ad9aaba09dd77494e75321ec214ed8
add visit_overloaded to ConstraintBuilderVisitorhttps://github.com/JamesGuthrie/mypy/commit/b3bb5c28c9c8c695d2e1fc214e2ca43fdf715c10
b3bb5c2https://github.com/JamesGuthrie/mypy/commit/b3bb5c28c9c8c695d2e1fc214e2ca43fdf715c10
Add SameTypeVisitor.visit_overloaded() implementationhttps://github.com/JamesGuthrie/mypy/commit/93c2b80e06c2817734c351d7a3bc566c81234a48
93c2b80https://github.com/JamesGuthrie/mypy/commit/93c2b80e06c2817734c351d7a3bc566c81234a48
Add visit_overloaded() to TypeTranslator.https://github.com/JamesGuthrie/mypy/commit/b2af6f429800389ca4f3db48e966c1239ebb396d
b2af6f4https://github.com/JamesGuthrie/mypy/commit/b2af6f429800389ca4f3db48e966c1239ebb396d
JukkaLhttps://github.com/JukkaL
on Oct 17, 2015https://github.com/python/mypy/issues/730#event-438342150
Add SameTypeVisitor.visit_overloaded() implementationhttps://github.com/python/mypy/commit/93f096d994aef7df85f6db2bf29037fec2fc4f81
93f096dhttps://github.com/python/mypy/commit/93f096d994aef7df85f6db2bf29037fec2fc4f81
Add visit_overloaded() to TypeTranslator.https://github.com/python/mypy/commit/d86fc75a5bc6f365840cb4dd085d837d233aac27
d86fc75https://github.com/python/mypy/commit/d86fc75a5bc6f365840cb4dd085d837d233aac27
Add visit_overloaded() to TypeQueryhttps://github.com/python/mypy/commit/da7080fef1fba36c373747eec432f99e7db298c8
da7080fhttps://github.com/python/mypy/commit/da7080fef1fba36c373747eec432f99e7db298c8
add visit_star_type() to TypeAnalyserPass3https://github.com/python/mypy/commit/dc941e54635f4b86ee53fb6e746cd8de47c6f296
dc941e5https://github.com/python/mypy/commit/dc941e54635f4b86ee53fb6e746cd8de47c6f296
add visit_overloaded() to ConstraintBuilderVisitorhttps://github.com/python/mypy/commit/15e21568cb4b68b4b7941a3c25c3b878e79c3838
15e2156https://github.com/python/mypy/commit/15e21568cb4b68b4b7941a3c25c3b878e79c3838
sixolethttps://github.com/sixolet
on Apr 20, 2017https://github.com/python/mypy/issues/730#event-1049918072
Use inheritance to allow most TypeVisitors not to deal with "syntheti…https://github.com/sixolet/mypy/commit/8f7d5c7e436795fe0d0ac2cf7b1bf2344fd161e1
8f7d5c7https://github.com/sixolet/mypy/commit/8f7d5c7e436795fe0d0ac2cf7b1bf2344fd161e1
JukkaLhttps://github.com/JukkaL
on Apr 20, 2017https://github.com/python/mypy/issues/730#event-1050735411
Use inheritance to allow most TypeVisitors not to deal with "syntheti…https://github.com/python/mypy/commit/dde184f51db578cbb7a0c29052a595f2fd5d340b
dde184fhttps://github.com/python/mypy/commit/dde184f51db578cbb7a0c29052a595f2fd5d340b
https://github.com/Joseph-Siddall-personnel
Joseph-Siddall-personnelhttps://github.com/Joseph-Siddall-personnel
on Apr 13, 2018https://github.com/python/mypy/issues/730#issuecomment-381180095
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
on Apr 13, 2018https://github.com/python/mypy/issues/730#issuecomment-381203039
JukkaLhttps://github.com/JukkaL
priority-1-normalhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-1-normal%22
false-positivemypy gave an error on correct codehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22false-positive%22
on May 17, 2018https://github.com/python/mypy/issues/730#event-1633132757
Michael0x2ahttps://github.com/Michael0x2a
on Aug 10, 2019https://github.com/python/mypy/issues/730#event-2547971091
Make TypeVisitor and SyntheticTypeVisitor fully abstracthttps://github.com/Michael0x2a/mypy/commit/2a550d8dcb35ce015191bb01995c680af370a788
2a550d8https://github.com/Michael0x2a/mypy/commit/2a550d8dcb35ce015191bb01995c680af370a788
ilevkivskyihttps://github.com/ilevkivskyi
completedhttps://github.com/python/mypy/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#7312https://github.com/python/mypy/pull/7312
on Aug 22, 2019https://github.com/python/mypy/issues/730#event-2577790422
ilevkivskyihttps://github.com/ilevkivskyi
on Aug 22, 2019https://github.com/python/mypy/issues/730#event-2577790508
Make TypeVisitor and SyntheticTypeVisitor (almost) fully abstract (#7312https://github.com/python/mypy/commit/5ebd05eccc1295995b8c1d6aef6710eb156255cc
#7312https://github.com/python/mypy/pull/7312
5ebd05ehttps://github.com/python/mypy/commit/5ebd05eccc1295995b8c1d6aef6710eb156255cc
Michael0x2ahttps://github.com/Michael0x2a
on Aug 25, 2019https://github.com/python/mypy/issues/730#event-2581982481
Make TypeVisitor and SyntheticTypeVisitor (almost) fully abstract (py…https://github.com/Michael0x2a/mypy/commit/42dc9383e8b1606800bc240b3333e55e8fa4de26
py…https://github.com/python/mypy/pull/7312
42dc938https://github.com/Michael0x2a/mypy/commit/42dc9383e8b1606800bc240b3333e55e8fa4de26
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/mypy/issues/730
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/mypy/issues/730
bugmypy got something wronghttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22bug%22
false-positivemypy gave an error on correct codehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22false-positive%22
priority-1-normalhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-1-normal%22
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.