René's URL Explorer Experiment


Title: "IndentationError: unexpected indent" when evaluating indented blocks of code · Issue #2837 · microsoft/vscode-python · GitHub

Open Graph Title: "IndentationError: unexpected indent" when evaluating indented blocks of code · Issue #2837 · microsoft/vscode-python

X Title: "IndentationError: unexpected indent" when evaluating indented blocks of code · Issue #2837 · microsoft/vscode-python

Description: Environment data VS Code version: 1.27.2 Extension version: 2018.9.0 OS and version: macOS Sierra 10.12.6 Python version: 3.7.0, installed via pyenv Type of virtual environment used: none Relevant/affected Python packages and their versi...

Open Graph Description: Environment data VS Code version: 1.27.2 Extension version: 2018.9.0 OS and version: macOS Sierra 10.12.6 Python version: 3.7.0, installed via pyenv Type of virtual environment used: none Relevant/...

X Description: Environment data VS Code version: 1.27.2 Extension version: 2018.9.0 OS and version: macOS Sierra 10.12.6 Python version: 3.7.0, installed via pyenv Type of virtual environment used: none Relevant/...

Opengraph URL: https://github.com/microsoft/vscode-python/issues/2837

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"\"IndentationError: unexpected indent\" when evaluating indented blocks of code","articleBody":"## Environment data\r\n\r\n- VS Code version: 1.27.2\r\n- Extension version: 2018.9.0\r\n- OS and version: macOS Sierra 10.12.6\r\n- Python version: 3.7.0, installed via pyenv\r\n- Type of virtual environment used: none \r\n- Relevant/affected Python packages and their versions: none\r\n\r\n## Actual behavior\r\n\r\nSending a selected Python code for evaluation in the Python terminal via _Run Selection/Line in Python Terminal_ results in `\"IndentationError: unexpected indent\"` errors if the block of code is indented.\r\n\r\nExample: evaluating the following selection results in an error because of the indentation of the whole block at 4 spaces:\r\n\r\n\u003cimg width=\"290\" alt=\"image\" src=\"https://user-images.githubusercontent.com/16516593/46737904-0922af80-cc9d-11e8-83cb-de77cad31676.png\">\r\n\r\n\u003cimg width=\"284\" alt=\"image\" src=\"https://user-images.githubusercontent.com/16516593/46737858-eb554a80-cc9c-11e8-8723-bd60aaae75fd.png\">\r\n\r\n\r\n## Expected  behavior\r\n\r\nIt would be useful if the evaluation of indented code worked regardless of it's position or level of indentation in the overall code (i.e. should be first deindented to a \"base level\" before sending to the terminal?).\r\n\r\nAs an example, the indented code above should be sent to the terminal as if it was the following (i.e. not indented):\r\n\r\n\u003cimg width=\"252\" alt=\"image\" src=\"https://user-images.githubusercontent.com/16516593/46737924-19d32580-cc9d-11e8-8ab0-edd933c23abb.png\">\r\n\u003cimg width=\"189\" alt=\"image\" src=\"https://user-images.githubusercontent.com/16516593/46737933-1f307000-cc9d-11e8-9ab0-a72d87824192.png\">\r\n\r\n\r\nI tend to work \"bottom-up\", evaluating/debugging smaller pieces of code that form more complex functions, and those individual pieces are obviously indented. This behavior makes this sort of workflow a little difficult.\r\n\r\n## Steps to reproduce\r\n\r\nUse the following example code to test the behavior described above by evaluating the two commented blocks using _Run Selection/Line in Python Terminal_ functionality.\r\n\r\n```\r\ndef fn():\r\n    # block indented by 4 spaces -> results in an error\r\n    x, y = 10, 2\r\n    for i in range(x):\r\n        print(i ** y)\r\n\r\n# block not indented -> correctly evaluated\r\nx, y = 10, 2\r\nfor i in range(x):\r\n    print(i ** y)\r\n```","author":{"url":"https://github.com/bodkan","@type":"Person","name":"bodkan"},"datePublished":"2018-10-10T13:04:28Z","url":"https://github.com/microsoft/vscode-python/issues/2837"}

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:83855444-3dde-50a4-37f7-cdd688c8efee
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAA5A:247139:70D6D9:99BBF2:6AFE692D
html-safe-nonce9c0bfdb96dca32cc5ec7f1a88c4995ce267d46bfb4fb41cb7998dd4113bc3027
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQTVBOjI0NzEzOTo3MEQ2RDk6OTlCQkYyOjZBRkU2OTJEIiwidmlzaXRvcl9pZCI6Ijg4MjMxOTIyMjMyMzYzODUwNjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacb1240163dcf3c8eb678929d4e51dadc44f7bf2b1c2fdf259bc2ffcdb183575a2
hovercard-subject-tagissue:368655662
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/vscode-python/2837/issue_layout
twitter:imagehttps://opengraph.githubassets.com/8a94000c52752c62be26ba0d65e72da2e878bb1270f3b3cd94b47c2a6795d9de/microsoft/vscode-python/issues/2837
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/8a94000c52752c62be26ba0d65e72da2e878bb1270f3b3cd94b47c2a6795d9de/microsoft/vscode-python/issues/2837
og:image:altEnvironment data VS Code version: 1.27.2 Extension version: 2018.9.0 OS and version: macOS Sierra 10.12.6 Python version: 3.7.0, installed via pyenv Type of virtual environment used: none Relevant/...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamebodkan
hostnamegithub.com
expected-hostnamegithub.com
Noneb3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86
turbo-cache-controlno-preview
go-importgithub.com/microsoft/vscode-python git https://github.com/microsoft/vscode-python.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id106462765
octolytics-dimension-repository_nwomicrosoft/vscode-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forktrue
octolytics-dimension-repository_parent_id49946255
octolytics-dimension-repository_parent_nwoDonJayamanne/pythonVSCode
octolytics-dimension-repository_network_root_id49946255
octolytics-dimension-repository_network_root_nwoDonJayamanne/pythonVSCode
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
release4a10310af51a1bfffbedc4fd81cb582acf0cb0ff
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/vscode-python/issues/2837#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fvscode-python%2Fissues%2F2837
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%2Fmicrosoft%2Fvscode-python%2Fissues%2F2837
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=microsoft%2Fvscode-python
Reloadhttps://github.com/microsoft/vscode-python/issues/2837
Reloadhttps://github.com/microsoft/vscode-python/issues/2837
Reloadhttps://github.com/microsoft/vscode-python/issues/2837
microsofthttps://github.com/microsoft
vscode-pythonhttps://github.com/microsoft/vscode-python
Codehttps://github.com/microsoft/vscode-python
Issues344 (344)https://github.com/microsoft/vscode-python/issues
Pull requests54 (54)https://github.com/microsoft/vscode-python/pulls
Discussionshttps://github.com/microsoft/vscode-python/discussions
Actionshttps://github.com/microsoft/vscode-python/actions
Wikihttps://github.com/microsoft/vscode-python/wiki
Security and quality2 (2)https://github.com/microsoft/vscode-python/security
Insightshttps://github.com/microsoft/vscode-python/insights
https://github.com/microsoft/vscode-python
New issuehttps://github.com/login?return_to=https://github.com/microsoft/vscode-python/issues/2837
New issuehttps://github.com/login?return_to=https://github.com/microsoft/vscode-python/issues/2837
"IndentationError: unexpected indent" when evaluating indented blocks of codehttps://github.com/microsoft/vscode-python/issues/2837#top
https://github.com/DonJayamanne
area-terminalhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22area-terminal%22
feature-requestRequest for new features or functionalityhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22feature-request%22
2019 - May Sprint 11https://github.com/microsoft/vscode-python/milestone/33
https://github.com/bodkan
Martin Petr (bodkan)https://github.com/bodkan
on Oct 10, 2018https://github.com/microsoft/vscode-python/issues/2837#issue-368655662
https://user-images.githubusercontent.com/16516593/46737904-0922af80-cc9d-11e8-83cb-de77cad31676.png
https://user-images.githubusercontent.com/16516593/46737858-eb554a80-cc9c-11e8-8723-bd60aaae75fd.png
https://user-images.githubusercontent.com/16516593/46737924-19d32580-cc9d-11e8-8ab0-edd933c23abb.png
https://user-images.githubusercontent.com/16516593/46737933-1f307000-cc9d-11e8-9ab0-a72d87824192.png
Nexthttps://github.com/microsoft/vscode-python/issues/2837?timeline_page=1
Derek Keeler (d3r3kk)https://github.com/d3r3kk
bugIssue identified by VS Code Team member as probable bughttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22bug%22
needs verificationhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22needs%20verification%22
area-terminalhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22area-terminal%22
on Oct 10, 2018https://github.com/microsoft/vscode-python/issues/2837#event-1895741762
https://github.com/bodkan
Martin Petr (bodkan)https://github.com/bodkan
on Oct 10, 2018https://github.com/microsoft/vscode-python/issues/2837#issuecomment-428609167
this functionhttps://github.com/Microsoft/vscode-python/blob/2be3452fa98f45baf7153f0ecd024c79c4e0b748/pythonFiles/normalizeForInterpreter.py#L69
Brett Cannon (brettcannon)https://github.com/brettcannon
Don Jayamanne (DonJayamanne)https://github.com/DonJayamanne
on Oct 10, 2018https://github.com/microsoft/vscode-python/issues/2837#event-1896326642
Don Jayamanne (DonJayamanne)https://github.com/DonJayamanne
needs verificationhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22needs%20verification%22
on Oct 18, 2018https://github.com/microsoft/vscode-python/issues/2837#event-1913520657
https://github.com/DonJayamanne
Don Jayamanne (DonJayamanne)https://github.com/DonJayamanne
on Oct 18, 2018https://github.com/microsoft/vscode-python/issues/2837#issuecomment-431187657
#169https://github.com/microsoft/vscode-python/issues/169
Don Jayamanne (DonJayamanne)https://github.com/DonJayamanne
needs PRhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22needs%20PR%22
on Oct 18, 2018https://github.com/microsoft/vscode-python/issues/2837#event-1913523639
https://github.com/syagev
Stav (syagev)https://github.com/syagev
on Nov 14, 2018https://github.com/microsoft/vscode-python/issues/2837#issuecomment-438656135
https://user-images.githubusercontent.com/5247438/48484564-18a69280-e81f-11e8-977c-ab8f6ed4acd3.png
Don Jayamanne (DonJayamanne)https://github.com/DonJayamanne
on Dec 6, 2018https://github.com/microsoft/vscode-python/issues/2837#event-2011169169
https://github.com/tjaeel
tjaeelhttps://github.com/tjaeel
on Jan 8, 2019https://github.com/microsoft/vscode-python/issues/2837#issuecomment-452159944
https://user-images.githubusercontent.com/29620527/50807546-bd33e500-1335-11e9-8e5a-5f134d3718e6.png
https://user-images.githubusercontent.com/29620527/50807635-07b56180-1336-11e9-8ec7-1b7a269e527d.png
Don Jayamanne (@DonJayamanne)https://github.com/DonJayamanne
https://github.com/martinpeck
Martin Peck (martinpeck)https://github.com/martinpeck
on Jan 20, 2019https://github.com/microsoft/vscode-python/issues/2837#issuecomment-455872406
https://stackoverflow.com/questions/54276596/indentation-error-on-visual-studio-code-on-a-mac-againhttps://stackoverflow.com/questions/54276596/indentation-error-on-visual-studio-code-on-a-mac-again
https://github.com/nihirisuto
nihirisuto (nihirisuto)https://github.com/nihirisuto
on Feb 10, 2019https://github.com/microsoft/vscode-python/issues/2837#issuecomment-462172080
https://github.com/scorpiocavalier
Arturo Chen (scorpiocavalier)https://github.com/scorpiocavalier
on Feb 19, 2019https://github.com/microsoft/vscode-python/issues/2837#issuecomment-465011175
Don Jayamanne (DonJayamanne)https://github.com/DonJayamanne
needs decisionhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22needs%20decision%22
on Feb 25, 2019https://github.com/microsoft/vscode-python/issues/2837#event-2162223684
https://github.com/rubenl92
rubenl92https://github.com/rubenl92
on May 8, 2019https://github.com/microsoft/vscode-python/issues/2837#issuecomment-490515229
Giovanni Carmiol (@gcarmiol)https://github.com/gcarmiol
https://github.com/nsymms
nsymms (nsymms)https://github.com/nsymms
on May 8, 2019https://github.com/microsoft/vscode-python/issues/2837#issuecomment-490548733
https://github.com/jjnurminen
Jussi Nurminen (jjnurminen)https://github.com/jjnurminen
on May 9, 2019https://github.com/microsoft/vscode-python/issues/2837#issuecomment-490799408
Luciana Abud (luabud)https://github.com/luabud
needs PRhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22needs%20PR%22
needs proposalNeed to make some design decisionshttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22needs%20proposal%22
on May 9, 2019https://github.com/microsoft/vscode-python/issues/2837#event-2330957098
https://github.com/luabud
Luciana Abud (luabud)https://github.com/luabud
on May 9, 2019https://github.com/microsoft/vscode-python/issues/2837#issuecomment-491000139
https://github.com/mikful
Mike Fuller (mikful)https://github.com/mikful
on May 23, 2019https://github.com/microsoft/vscode-python/issues/2837#issuecomment-495308506
https://github.com/DonJayamanne
Don Jayamanne (DonJayamanne)https://github.com/DonJayamanne
on May 29, 2019https://github.com/microsoft/vscode-python/issues/2837#issuecomment-497108655
Don Jayamanne (DonJayamanne)https://github.com/DonJayamanne
2019 - May Sprint 11https://github.com/microsoft/vscode-python/milestone/33
on May 29, 2019https://github.com/microsoft/vscode-python/issues/2837#event-2376666243
https://github.com/nsymms
nsymms (nsymms)https://github.com/nsymms
on May 30, 2019https://github.com/microsoft/vscode-python/issues/2837#issuecomment-497332394
Don Jayamanne (@DonJayamanne)https://github.com/DonJayamanne
Don Jayamanne (DonJayamanne)https://github.com/DonJayamanne
on May 30, 2019https://github.com/microsoft/vscode-python/issues/2837#event-2379041286
https://github.com/ericsnowcurrently
Eric Snow (ericsnowcurrently)https://github.com/ericsnowcurrently
on Jun 5, 2019https://github.com/microsoft/vscode-python/issues/2837#issuecomment-499171086
Eric Snow (ericsnowcurrently)https://github.com/ericsnowcurrently
completedhttps://github.com/microsoft/vscode-python/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jun 5, 2019https://github.com/microsoft/vscode-python/issues/2837#event-2391912514
needs PRhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22needs%20PR%22
on Jun 5, 2019https://github.com/microsoft/vscode-python/issues/2837#event-2391912610
lockhttps://github.com/apps/lock
on Jun 12, 2019https://github.com/microsoft/vscode-python/issues/2837#event-2408232581
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/vscode-python/issues/2837
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/vscode-python/issues/2837
Don Jayamanne (DonJayamanne)https://github.com/DonJayamanne
area-terminalhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22area-terminal%22
feature-requestRequest for new features or functionalityhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22feature-request%22
2019 - May Sprint 11https://github.com/microsoft/vscode-python/milestone/33
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.