René's URL Explorer Experiment


Title: Not detecting UnboundLocalError · Issue #2400 · python/mypy · GitHub

Open Graph Title: Not detecting UnboundLocalError · Issue #2400 · python/mypy

X Title: Not detecting UnboundLocalError · Issue #2400 · python/mypy

Description: mypy doesn't seem to warn about control flows which might lead to UnboundLocalError, e.g.: def func(arg): if arg: variable = 1 print(variable) func(0) Is this deliberate?

Open Graph Description: mypy doesn't seem to warn about control flows which might lead to UnboundLocalError, e.g.: def func(arg): if arg: variable = 1 print(variable) func(0) Is this deliberate?

X Description: mypy doesn't seem to warn about control flows which might lead to UnboundLocalError, e.g.: def func(arg): if arg: variable = 1 print(variable) func(0) Is this deliberate?

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Not detecting UnboundLocalError","articleBody":"mypy doesn't seem to warn about control flows which might lead to UnboundLocalError, e.g.:\r\n```\r\ndef func(arg):\r\n    if arg:\r\n        variable = 1\r\n    print(variable)\r\n\r\nfunc(0)\r\n```\r\nIs this deliberate?","author":{"url":"https://github.com/tlynn","@type":"Person","name":"tlynn"},"datePublished":"2016-11-04T14:24:52Z","url":"https://github.com/python/mypy/issues/2400"}

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:4d1c4d05-a987-8f72-4ef1-93c2e17e37d5
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9ABA:2148FB:1EF4F22:29F653B:6B00158E
html-safe-nonce370f6f1a3857babba772ac61fb284314703fa90accd71291d38469b5c5df12ca
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QUJBOjIxNDhGQjoxRUY0RjIyOjI5RjY1M0I6NkIwMDE1OEUiLCJ2aXNpdG9yX2lkIjoiNTE3MjIzNDQyNTUwMDQzOTk1MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaceebe27b9f49c33b823f28722130426883d4cb8c53d81906a4662c92055792355
hovercard-subject-tagissue:187346392
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/2400/issue_layout
twitter:imagehttps://opengraph.githubassets.com/f2c5a5923e222f794f13cdc8c938dfb60b8476b151d537b4a123e8d9868e5434/python/mypy/issues/2400
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f2c5a5923e222f794f13cdc8c938dfb60b8476b151d537b4a123e8d9868e5434/python/mypy/issues/2400
og:image:altmypy doesn't seem to warn about control flows which might lead to UnboundLocalError, e.g.: def func(arg): if arg: variable = 1 print(variable) func(0) Is this deliberate?
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernametlynn
hostnamegithub.com
expected-hostnamegithub.com
Nonea2dd2291b1b13cc9c06f27ec92fa3dbaf34116fc24c9347b8539db61884c59f4
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
release70121d4e855ee0bb7b75cf15d061d91f8863c0f8
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/mypy/issues/2400#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fissues%2F2400
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%2F2400
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/2400
Reloadhttps://github.com/python/mypy/issues/2400
Reloadhttps://github.com/python/mypy/issues/2400
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/2400
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/2400
Not detecting UnboundLocalErrorhttps://github.com/python/mypy/issues/2400#top
featurehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22feature%22
priority-0-highhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-0-high%22
topic-runtime-semanticsmypy doesn't model runtime semantics correctlyhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-runtime-semantics%22
https://github.com/tlynn
tlynnhttps://github.com/tlynn
on Nov 4, 2016https://github.com/python/mypy/issues/2400#issue-187346392
Nexthttps://github.com/python/mypy/issues/2400?timeline_page=1
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Nov 4, 2016https://github.com/python/mypy/issues/2400#issuecomment-258451421
https://github.com/tlynn
tlynnhttps://github.com/tlynn
on Nov 4, 2016https://github.com/python/mypy/issues/2400#issuecomment-258455902
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on Nov 4, 2016https://github.com/python/mypy/issues/2400#issuecomment-258464198
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Nov 23, 2016https://github.com/python/mypy/issues/2400#issuecomment-262586044
JukkaLhttps://github.com/JukkaL
featurehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22feature%22
priority-2-lowhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-2-low%22
on Jan 16, 2017https://github.com/python/mypy/issues/2400#event-924128283
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Feb 24, 2017https://github.com/python/mypy/issues/2400#issuecomment-282288734
#2877https://github.com/python/mypy/issues/2877
https://github.com/tlynn
tlynnhttps://github.com/tlynn
on Nov 16, 2017https://github.com/python/mypy/issues/2400#issuecomment-344928323
https://github.com/google/pytypehttps://github.com/google/pytype
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Oct 2, 2018https://github.com/python/mypy/issues/2400#issuecomment-426255927
ilevkivskyihttps://github.com/ilevkivskyi
priority-1-normalhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-1-normal%22
priority-2-lowhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-2-low%22
on Oct 2, 2018https://github.com/python/mypy/issues/2400#event-1879174865
https://github.com/lilydjwg
lilydjwghttps://github.com/lilydjwg
on Nov 6, 2018https://github.com/python/mypy/issues/2400#issuecomment-436132493
https://github.com/kylebebak
kylebebakhttps://github.com/kylebebak
on Mar 17, 2019https://github.com/python/mypy/issues/2400#issuecomment-473703884
@lilydjwghttps://github.com/lilydjwg
https://github.com/kylebebak
kylebebakhttps://github.com/kylebebak
on Mar 17, 2019https://github.com/python/mypy/issues/2400#issuecomment-473705507
probably never do thishttps://github.com/PyCQA/pyflakes/issues/236
Neitherhttps://github.com/PyCQA/pylint/issues/1727
does pylinthttps://github.com/PyCQA/pylint/issues/1807
pytypehttps://github.com/google/pytype
https://github.com/kylebebak
kylebebakhttps://github.com/kylebebak
on Apr 26, 2019https://github.com/python/mypy/issues/2400#issuecomment-487108273
@JukkaLhttps://github.com/JukkaL
@ilevkivskyihttps://github.com/ilevkivskyi
https://github.com/kylebebak
kylebebakhttps://github.com/kylebebak
on Feb 7, 2020https://github.com/python/mypy/issues/2400#issuecomment-583520864
@lilydjwghttps://github.com/lilydjwg
https://github.com/Arshaan-256
Arshaan-256https://github.com/Arshaan-256
on Mar 12, 2020https://github.com/python/mypy/issues/2400#issuecomment-598459875
@JukkaLhttps://github.com/JukkaL
https://github.com/tlynn
tlynnhttps://github.com/tlynn
on Mar 13, 2020https://github.com/python/mypy/issues/2400#issuecomment-598770780
https://github.com/tlynn
tlynnhttps://github.com/tlynn
on Mar 13, 2020https://github.com/python/mypy/issues/2400#issuecomment-598827089
https://github.com/python/mypy/compare/master...tlynn:issue2400-wip?expand=1https://github.com/python/mypy/compare/master...tlynn:issue2400-wip?expand=1
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Mar 20, 2020https://github.com/python/mypy/issues/2400#issuecomment-601725877
@tlynnhttps://github.com/tlynn
https://github.com/karlicoss
karlicosshttps://github.com/karlicoss
on Mar 20, 2020https://github.com/python/mypy/issues/2400#issuecomment-601909307
pep 526https://www.python.org/dev/peps/pep-0526/#global-and-local-variable-annotations
https://github.com/freundTech
freundTechhttps://github.com/freundTech
on Mar 12, 2021https://github.com/python/mypy/issues/2400#issuecomment-797812855
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Mar 13, 2021https://github.com/python/mypy/issues/2400#issuecomment-798192170
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
on Mar 13, 2021https://github.com/python/mypy/issues/2400#issuecomment-798477686
https://github.com/quora/pyanalyzehttps://github.com/quora/pyanalyze
https://github.com/Baukebrenninkmeijer
Baukebrenninkmeijerhttps://github.com/Baukebrenninkmeijer
on Jul 20, 2021https://github.com/python/mypy/issues/2400#issuecomment-883450641
@JukkaLhttps://github.com/JukkaL
JelleZijlstrahttps://github.com/JelleZijlstra
topic-runtime-semanticsmypy doesn't model runtime semantics correctlyhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-runtime-semantics%22
on Mar 19, 2022https://github.com/python/mypy/issues/2400#event-6270241357
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
on Mar 19, 2022https://github.com/python/mypy/issues/2400#issuecomment-1073062905
#686https://github.com/python/mypy/issues/686
#4019https://github.com/python/mypy/issues/4019
JelleZijlstrahttps://github.com/JelleZijlstra
completedhttps://github.com/python/mypy/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Mar 19, 2022https://github.com/python/mypy/issues/2400#event-6270241846
https://github.com/inghowepang
inghowepanghttps://github.com/inghowepang
on Jan 9, 2023https://github.com/python/mypy/issues/2400#issuecomment-1374975783
https://github.com/Dreamsorcerer
Dreamsorcererhttps://github.com/Dreamsorcerer
on Jan 9, 2023https://github.com/python/mypy/issues/2400#issuecomment-1375734406
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/mypy/issues/2400
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/mypy/issues/2400
featurehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22feature%22
priority-0-highhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-0-high%22
topic-runtime-semanticsmypy doesn't model runtime semantics correctlyhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22topic-runtime-semantics%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.