Title: Auto indentation broken when return keyword involved · Issue #141 · microsoft/vscode-python · GitHub
Open Graph Title: Auto indentation broken when return keyword involved · Issue #141 · microsoft/vscode-python
X Title: Auto indentation broken when return keyword involved · Issue #141 · microsoft/vscode-python
Description: From Josh Smeaton (@jarshwah) on July 17, 2017 2:56 Environment data VS Code version: 1.14.0 Python Extension version: 0.6.7 Python Version: 2.7.13 OS and version: OSX 10.12.5 (16F73) Actual behavior Auto indentation of function argument...
Open Graph Description: From Josh Smeaton (@jarshwah) on July 17, 2017 2:56 Environment data VS Code version: 1.14.0 Python Extension version: 0.6.7 Python Version: 2.7.13 OS and version: OSX 10.12.5 (16F73) Actual behavi...
X Description: From Josh Smeaton (@jarshwah) on July 17, 2017 2:56 Environment data VS Code version: 1.14.0 Python Extension version: 0.6.7 Python Version: 2.7.13 OS and version: OSX 10.12.5 (16F73) Actual behavi...
Opengraph URL: https://github.com/microsoft/vscode-python/issues/141
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Auto indentation broken when return keyword involved","articleBody":"_From @jarshwah on July 17, 2017 2:56_\n\n## Environment data\r\nVS Code version: 1.14.0\r\nPython Extension version: 0.6.7\r\nPython Version: 2.7.13\r\nOS and version: OSX 10.12.5 (16F73)\r\n\r\n## Actual behavior\r\n\r\nAuto indentation of function arguments fails when the function is preceded by the `return` keyword. The closing paren is put on the first column along with the cursor. Removing the `return` keyword fixes the issue.\r\n\r\n```\r\n# | represents cursor\r\n\r\ndef failing():\r\n return arg(|) # hit enter\r\n\r\ndef failing():\r\n return arg(\r\n|)\r\n\r\ndef works():\r\n arg(|) # hit enter\r\n\r\ndef works():\r\n arg(\r\n |\r\n )\r\n```\r\n\r\n## Expected behavior\r\n\r\n```\r\ndef failing():\r\n return arg(|) # hit enter\r\n\r\ndef failing():\r\n return arg(\r\n |\r\n )\r\n```\r\n\r\n## Steps to reproduce: \r\n\r\nSee expected and actual behaviour above\r\n\r\n## Settings \r\n\r\nYour settings.json: \r\n```json\r\n// Place your settings in this file to overwrite the default settings\r\n{\r\n \"extensions.autoUpdate\": true,\r\n \"editor.autoIndent\": true,\r\n \"editor.fontSize\": 13,\r\n \"editor.fontFamily\": \"Source Code Pro\",\r\n \"editor.minimap.enabled\": false,\r\n \"editor.wordWrap\": \"off\",\r\n \"editor.rulers\": [\r\n 79, 99, 119\r\n],\r\n\"editor.renderIndentGuides\": true,\r\n\"editor.renderLineHighlight\": \"all\",\r\n\"editor.dragAndDrop\": false,\r\n\"emmet.useNewEmmet\": true,\r\n \"files.insertFinalNewline\": true,\r\n \"python.pythonPath\": \"python3\",\r\n \"python.formatting.provider\": \"yapf\",\r\n \"python.formatting.autopep8Args\": [\"--max-line-length=119\"],\r\n \"python.linting.pylintEnabled\": false,\r\n \"python.linting.flake8Args\": [\"--max-line-length=119\"],\r\n \"python.linting.enabled\": true,\r\n \"python.linting.pep8Enabled\": false,\r\n \"python.linting.flake8Enabled\": true,\r\n \"python.workspaceSymbols.exclusionPatterns\": [\r\n \"**/site-packages/**\",\r\n \".tox/**\"\r\n ],\r\n \"workbench.editor.showTabs\": true,\r\n \"editor.renderWhitespace\": \"all\",\r\n \"files.trimTrailingWhitespace\": true,\r\n \"window.zoomLevel\": 0,\r\n \"vsicons.projectDetection.autoReload\": true,\r\n \"workbench.colorTheme\": \"Atom One Dark\",\r\n \"workbench.iconTheme\": \"vscode-icons\",\r\n \"workbench.editor.enablePreview\": true,\r\n \"workbench.editor.revealIfOpen\": true,\r\n \"sync.host\": \"\",\r\n \"sync.pathPrefix\": \"\",\r\n \"typescript.tsserver.log\": \"verbose\",\r\n \"search.useRipgrep\": false // todo: remove once global search fixed\r\n}\r\n\r\n``` \r\n## Logs\r\nOutput from ```Python``` output panel \r\n```\r\nNo Relevant Logs\r\n``` \r\nOutput from ```Console window``` (Help->Developer Tools menu)\r\n```\r\nNo Relevant Logs\r\n```\r\n\r\nI see the same behaviour by switching the `\"editor.autoIndent\": true,` to false. Only began happening with 1.14.0 from memory.\n\n_Copied from original issue: DonJayamanne/pythonVSCode#1087_","author":{"url":"https://github.com/DonJayamanne","@type":"Person","name":"DonJayamanne"},"datePublished":"2017-11-13T23:59:52Z","url":"https://github.com/microsoft/vscode-python/issues/141"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d7c8cb0e-3ac3-d7ae-3cb7-d44a42119910 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CC8A:2BFC5C:A43ED:D7880:6AFE325A |
| html-safe-nonce | cdc9f4e44ab149100183a67885d5d323690315b4c5c898d672fd8bec1327bbb2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQzhBOjJCRkM1QzpBNDNFRDpENzg4MDo2QUZFMzI1QSIsInZpc2l0b3JfaWQiOiI4OTEwNzM2ODgwOTMzMTU1NDE4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 965b9acd28e06063889224149c394bdd8c913319945c40afaea32af1efa4d1cc |
| hovercard-subject-tag | issue:273621436 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/vscode-python/141/issue_layout |
| twitter:image | https://opengraph.githubassets.com/19262e3c508852e2c39657f53b205f84ed2237793a3c60b00657ad43b3525af2/microsoft/vscode-python/issues/141 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/19262e3c508852e2c39657f53b205f84ed2237793a3c60b00657ad43b3525af2/microsoft/vscode-python/issues/141 |
| og:image:alt | From Josh Smeaton (@jarshwah) on July 17, 2017 2:56 Environment data VS Code version: 1.14.0 Python Extension version: 0.6.7 Python Version: 2.7.13 OS and version: OSX 10.12.5 (16F73) Actual behavi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | DonJayamanne |
| hostname | github.com |
| expected-hostname | github.com |
| None | d70e31220a67f6376c108d2416fa8e7df854c1065b1672ab7a88ab6dc3a809e2 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/vscode-python git https://github.com/microsoft/vscode-python.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 106462765 |
| octolytics-dimension-repository_nwo | microsoft/vscode-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | true |
| octolytics-dimension-repository_parent_id | 49946255 |
| octolytics-dimension-repository_parent_nwo | DonJayamanne/pythonVSCode |
| octolytics-dimension-repository_network_root_id | 49946255 |
| octolytics-dimension-repository_network_root_nwo | DonJayamanne/pythonVSCode |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ccb88d9c92abe69245b429398c8a57ae87070c7c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width