René's URL Explorer Experiment


Title: VSCode Python Extention giving undefined variable warnings for defined variables in 2020.2.63072 · Issue #1908 · microsoft/python-language-server · GitHub

Open Graph Title: VSCode Python Extention giving undefined variable warnings for defined variables in 2020.2.63072 · Issue #1908 · microsoft/python-language-server

X Title: VSCode Python Extention giving undefined variable warnings for defined variables in 2020.2.63072 · Issue #1908 · microsoft/python-language-server

Description: Good Afternoon, i think there may be an bug on the latest release of the Python extention for VSC that results in warnings being given suggesting varibables are undefined when the variables are defined. ive been using VSCode with the pyt...

Open Graph Description: Good Afternoon, i think there may be an bug on the latest release of the Python extention for VSC that results in warnings being given suggesting varibables are undefined when the variables are def...

X Description: Good Afternoon, i think there may be an bug on the latest release of the Python extention for VSC that results in warnings being given suggesting varibables are undefined when the variables are def...

Opengraph URL: https://github.com/microsoft/python-language-server/issues/1908

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"VSCode Python Extention giving undefined variable warnings for defined variables in 2020.2.63072","articleBody":"Good Afternoon, \r\ni think there may be an bug on the latest release of the Python extention for VSC that results in warnings being given suggesting varibables are undefined when the variables are defined.\r\n\r\nive been using VSCode with the python extention for a while and after updating the python extention today (to 2020.2.63072) i now have 34 warnings in my code for undefined variables. my problem is that they are all defined, the code works as it did before i updated the extention and as i would expect it to. \r\n\r\nif i revert the python extention back to version 2020.1.58038 i dont get the warnings, update from that to 2020.2.62710 or 2020.2.63072 and both are giving me warnings. \r\n\r\nIve tried removing all extentions and reinstalling VSC, all without success. Im currently running VSC with only one user installed extention, that is the Python 2020.2.63072 extention. \r\n\r\nBelow is an example piece of code that throws such a warning for me . in my project i use similar methods whereby i run certain code depending on the environment in which it is run (its intended to run on a raspberry pi with camera, but can be run on windows, for pi i import the picamera modules and support capturing images with the camera, for windows that feature is disabled but the rest of the code runs). The code below reproduces what i think is the bug.\r\n\r\n```\r\nimport sys\r\n\r\nif sys.platform == 'linux':\r\n    aVariable=\"Hello Linux\"\r\n    print(aVariable) #WARNING THAT aVariable IS UNDEFINED HERE\r\n\r\nelse:\r\n    aVariable=\"Hello Other\"\r\n    print(aVariable) #NO WARNING HERE, BUT IM WRITING THIS ON WINDOWS\r\n```\r\n\r\nWith that code, VSC lists a warning that aVariable is undefined within the linux check, (line 5) . There is no such warning given at line 9 which would trigger if not linux. as i mention above if i move back to an older version of the Python extention this warning is not given. \r\n\r\nIm running VSC on Windows 10, and my suspicion is that where i have variables declared and referenced only after a given condition is met, then if that condition is not met within the environment for which i am writing the code, the warnings are generated. e.g. within the if statement to check if this is linux, i get an undeclared variable warning if im writing the code on a windows machine. i dont believe this should happen, and doesnt happen on older versions of the extention.\r\n\r\ni have noted that when i switch versions on this extention, the MPLS is redownloaded in the background. im not sure how to obtain the version number for MPLS to be able to post here? My appologies, im new to CSV and Python\r\n\r\n## Environment data\r\n\r\n- VS Code version: 1.42.1\r\n- Extension version (available under the Extensions sidebar): 2020.2.63072\r\n- OS and version: Windows 10 Pro - 1903\r\n- Python version (\u0026 distribution if applicable, e.g. Anaconda): 3.8.1 32 Bit\r\n- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): n/a\r\n- Relevant/affected Python packages and their versions: n/a\r\n- Relevant/affected Python-related VS Code extensions and their versions: Python 2020.2.63072\r\n- Jedi or Language Server? (i.e. what is `\"python.jediEnabled\"` set to; more info microsoft/vscode-python#3977): MPLS\r\n- Value of the `python.languageServer` setting: XXX\r\n","author":{"url":"https://github.com/meetheed","@type":"Person","name":"meetheed"},"datePublished":"2020-02-14T17:23:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":12},"url":"https://github.com/1908/python-language-server/issues/1908"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:1298daf4-84a7-f81c-95ee-0667c3da39cc
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCBA2:FBCC6:135855C:1A37FA6:6A4D6EAE
html-safe-noncefce6ef754528e0f6fbfa81c88cd94ba37ffc3ec41daf4b2d93c04eec8787ab59
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQkEyOkZCQ0M2OjEzNTg1NUM6MUEzN0ZBNjo2QTRENkVBRSIsInZpc2l0b3JfaWQiOiI1MDk4MTY3NTY4NDQwMzIzNzU4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacdd438412a58ff3f42da1ad22962ea5511098a79a9a7291daea9b6f262273491e
hovercard-subject-tagissue:567163908
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/microsoft/python-language-server/1908/issue_layout
twitter:imagehttps://opengraph.githubassets.com/cb8243a1e00aa9448cb0a6b1aa300d7073e34f3308f46293d68474bed6546ea3/microsoft/python-language-server/issues/1908
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/cb8243a1e00aa9448cb0a6b1aa300d7073e34f3308f46293d68474bed6546ea3/microsoft/python-language-server/issues/1908
og:image:altGood Afternoon, i think there may be an bug on the latest release of the Python extention for VSC that results in warnings being given suggesting varibables are undefined when the variables are def...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemeetheed
hostnamegithub.com
expected-hostnamegithub.com
Nonec78260c7b3f4ac4b0356c8208537f05406a3a2d46a9ec3f735b372dcc519c39e
turbo-cache-controlno-preview
go-importgithub.com/microsoft/python-language-server git https://github.com/microsoft/python-language-server.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id145901977
octolytics-dimension-repository_nwomicrosoft/python-language-server
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id145901977
octolytics-dimension-repository_network_root_nwomicrosoft/python-language-server
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
release399fff412f48461d435721c009efc17ea44be72f
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/microsoft/python-language-server/issues/1908#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fpython-language-server%2Fissues%2F1908
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fpython-language-server%2Fissues%2F1908
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%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoft%2Fpython-language-server
Reloadhttps://github.com/microsoft/python-language-server/issues/1908
Reloadhttps://github.com/microsoft/python-language-server/issues/1908
Reloadhttps://github.com/microsoft/python-language-server/issues/1908
Please reload this pagehttps://github.com/microsoft/python-language-server/issues/1908
microsoft https://github.com/microsoft
python-language-serverhttps://github.com/microsoft/python-language-server
Notifications https://github.com/login?return_to=%2Fmicrosoft%2Fpython-language-server
Fork 131 https://github.com/login?return_to=%2Fmicrosoft%2Fpython-language-server
Star 921 https://github.com/login?return_to=%2Fmicrosoft%2Fpython-language-server
Code https://github.com/microsoft/python-language-server
Issues 309 https://github.com/microsoft/python-language-server/issues
Pull requests 6 https://github.com/microsoft/python-language-server/pulls
Projects https://github.com/microsoft/python-language-server/projects
Models https://github.com/microsoft/python-language-server/models
Wiki https://github.com/microsoft/python-language-server/wiki
Security and quality 0 https://github.com/microsoft/python-language-server/security
Insights https://github.com/microsoft/python-language-server/pulse
Code https://github.com/microsoft/python-language-server
Issues https://github.com/microsoft/python-language-server/issues
Pull requests https://github.com/microsoft/python-language-server/pulls
Projects https://github.com/microsoft/python-language-server/projects
Models https://github.com/microsoft/python-language-server/models
Wiki https://github.com/microsoft/python-language-server/wiki
Security and quality https://github.com/microsoft/python-language-server/security
Insights https://github.com/microsoft/python-language-server/pulse
#1999https://github.com/microsoft/python-language-server/pull/1999
VSCode Python Extention giving undefined variable warnings for defined variables in 2020.2.63072https://github.com/microsoft/python-language-server/issues/1908#top
#1999https://github.com/microsoft/python-language-server/pull/1999
https://github.com/MikhailArkhipov
bugSomething isn't workinghttps://github.com/microsoft/python-language-server/issues?q=state%3Aopen%20label%3A%22bug%22
feature: linterhttps://github.com/microsoft/python-language-server/issues?q=state%3Aopen%20label%3A%22feature%3A%20linter%22
https://github.com/meetheed
meetheedhttps://github.com/meetheed
on Feb 14, 2020https://github.com/microsoft/python-language-server/issues/1908#issue-567163908
How to update the language server to the latest stable version vscode-python#3977https://github.com/microsoft/vscode-python/issues/3977
MikhailArkhipovhttps://github.com/MikhailArkhipov
bugSomething isn't workinghttps://github.com/microsoft/python-language-server/issues?q=state%3Aopen%20label%3A%22bug%22
feature: linterhttps://github.com/microsoft/python-language-server/issues?q=state%3Aopen%20label%3A%22feature%3A%20linter%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.