René's URL Explorer Experiment


Title: Auto-Formatting (autopep8, black, yapf) Doesn't Work On Unsaved Files · Issue #2268 · microsoft/vscode-python · GitHub

Open Graph Title: Auto-Formatting (autopep8, black, yapf) Doesn't Work On Unsaved Files · Issue #2268 · microsoft/vscode-python

X Title: Auto-Formatting (autopep8, black, yapf) Doesn't Work On Unsaved Files · Issue #2268 · microsoft/vscode-python

Description: Environment data VS Code version: 1.25.1 Extension version (available under the Extensions sidebar): 2018.7.1 OS and version: Ubuntu 18.04 Python version (& distribution if applicable, e.g. Anaconda): Python 2.7.15rc1 and Python 3.6.5 Ty...

Open Graph Description: Environment data VS Code version: 1.25.1 Extension version (available under the Extensions sidebar): 2018.7.1 OS and version: Ubuntu 18.04 Python version (& distribution if applicable, e.g. Anacond...

X Description: Environment data VS Code version: 1.25.1 Extension version (available under the Extensions sidebar): 2018.7.1 OS and version: Ubuntu 18.04 Python version (& distribution if applicable, e.g. Ana...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Auto-Formatting (autopep8, black, yapf) Doesn't Work On Unsaved Files","articleBody":"\u003c!-- \r\nDo you have a question instead of a bug report or enhancement request? Please ask it on https://stackoverflow.com/questions/tagged/visual-studio-code+python. \r\n\r\nUnable to install a linter or formatter? 'No installers available'? \r\nWindows - https://stackoverflow.com/questions/4750806/how-do-i-install-pip-on-windows\r\nLinux - https://www.cyberciti.biz/faq/debian-ubuntu-centos-rhel-linux-install-pipclient/ , https://www.tecmint.com/install-pip-in-linux/\r\n\r\nPython configuration issues? Please check https://code.visualstudio.com/docs/python/python-tutorial#_prerequisites\r\n\r\nOtherwise **please** fill in the requested details below. \"XXX\" markers should not be present in the final bug report.\r\n-->\r\n\r\n## Environment data\r\n\r\n- VS Code version: 1.25.1\r\n- Extension version (available under the Extensions sidebar): 2018.7.1\r\n- OS and version: Ubuntu 18.04\r\n- Python version (& distribution if applicable, e.g. Anaconda): Python 2.7.15rc1 and Python 3.6.5\r\n- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A\r\n- Relevant/affected Python packages and their versions: autopep8 1.3.5 (pycodestyle: 2.4.0), black version 18.6b4, yapf 0.22.0\r\n\r\n## Actual behavior\r\n\r\nWorking with Python code in an unsaved file, executing the command `editor.action.formatDocument` has no effect on the text. The status bar briefly flashes to say that the formatter was run. \r\n\r\nIf you then save the document and run the same command, the formatter runs and edits the text as normal. \r\n\r\n## Expected  behavior\r\n\r\nWorking with Python code in an unsaved file, `editor.action.formatDocument` will run the associated Python formatter (yapf, autopep8) and edit the text inline using default style settings. \r\n\r\n## Steps to reproduce:\r\n\r\n1. Open a new file. (`File->New`, or `Ctrl+N` by default.)\r\n2. Paste a large Python dict into the file on a single line. For instance: ```{0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15, 16: 16, 17: 17, 18: 18, 19: 19, 20: 20, 21: 21, 22: 22, 23: 23, 24: 24, 25: 25, 26: 26, 27: 27, 28: 28, 29: 29, 30: 30, 31: 31, 32: 32, 33: 33, 34: 34, 35: 35, 36: 36, 37: 37, 38: 38, 39: 39, 40: 40, 41: 41, 42: 42, 43: 43, 44: 44, 45: 45, 46: 46, 47: 47, 48: 48, 49: 49, 50: 50, 51: 51, 52: 52, 53: 53, 54: 54, 55: 55, 56: 56, 57: 57, 58: 58, 59: 59, 60: 60, 61: 61, 62: 62, 63: 63, 64: 64, 65: 65, 66: 66, 67: 67, 68: 68, 69: 69, 70: 70, 71: 71, 72: 72, 73: 73, 74: 74, 75: 75, 76: 76, 77: 77, 78: 78, 79: 79, 80: 80, 81: 81, 82: 82, 83: 83, 84: 84, 85: 85, 86: 86, 87: 87, 88: 88, 89: 89, 90: 90, 91: 91, 92: 92, 93: 93, 94: 94, 95: 95, 96: 96, 97: 97, 98: 98, 99: 99}```\r\n3. Open the language picker (`Command Palette->Change Language Mode`, or `Ctrl+K M`* by default) and select Python. \r\n4. Execute the `editor.action.formatDocument` command (`Command Palette->Format Document`, or `Ctrl+Shift+I` by default)\r\n5. Note that the status bar briefly flashes the name of your set code formatter, but the document doesn't change. \r\n6. Save the file. (`File->Save`, or `Ctrl+S` by default.)\r\n7. Repeat step 4. \r\n8. Note that now the document is actually formatted. \r\n9. *(Optional) Change formatter and repeat steps 1-8.*\r\n10. *(Optional) Change Python interpreter and repeat steps 1-9.*\r\n\r\n*: This default keybind doesn't actually work for me, instead launching a search in the Extensions Marketplace for `@recommended:keymaps`.\r\n\r\n## Logs\r\nOutput for `Python` in the `Output` panel (`View`→`Output`, change the drop-down the upper-right of the `Output` panel to `Python`)\r\n\r\n```\r\n \r\n```   \r\n\r\nOutput from `Console` under the `Developer Tools` panel (toggle Developer Tools on under `Help`)\r\n\r\n```\r\n \r\n```\r\n","author":{"url":"https://github.com/CoryOwens","@type":"Person","name":"CoryOwens"},"datePublished":"2018-07-27T17:18:12Z","url":"https://github.com/microsoft/vscode-python/issues/2268"}

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:2cab1576-b7bd-d99b-2ca7-0e5fcd8068eb
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD394:2BC66C:10E23E:16D954:6AFE45C0
html-safe-nonce05b98d323d0101f51ec23177ed719619d278cebdc5232be76de86b7a38d15068
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMzk0OjJCQzY2QzoxMEUyM0U6MTZEOTU0OjZBRkU0NUMwIiwidmlzaXRvcl9pZCI6IjY0OTcxNDcyNDE2MTYwMzAwOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac70c3b4b454fe292ef4448638d9c779df9382df2f84d81cbdc73585ad9c36ad6d
hovercard-subject-tagissue:345303718
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/2268/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b0fc8aeb9f5bb4923da1274e2c885d4d7d9ac562aedf4e151c0ba03fcc530134/microsoft/vscode-python/issues/2268
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b0fc8aeb9f5bb4923da1274e2c885d4d7d9ac562aedf4e151c0ba03fcc530134/microsoft/vscode-python/issues/2268
og:image:altEnvironment data VS Code version: 1.25.1 Extension version (available under the Extensions sidebar): 2018.7.1 OS and version: Ubuntu 18.04 Python version (& distribution if applicable, e.g. Anacond...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameCoryOwens
hostnamegithub.com
expected-hostnamegithub.com
Nonef1a5901e2377b0af2a0b303f9528678f1475d04b9219dca1e993344196eaa07c
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
releasece393ea11ad276623b946bc9663d3e7d6f564275
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/vscode-python/issues/2268#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fvscode-python%2Fissues%2F2268
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%2F2268
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/2268
Reloadhttps://github.com/microsoft/vscode-python/issues/2268
Reloadhttps://github.com/microsoft/vscode-python/issues/2268
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/2268
New issuehttps://github.com/login?return_to=https://github.com/microsoft/vscode-python/issues/2268
Auto-Formatting (autopep8, black, yapf) Doesn't Work On Unsaved Fileshttps://github.com/microsoft/vscode-python/issues/2268#top
area-formattinghttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22area-formatting%22
feature-requestRequest for new features or functionalityhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22feature-request%22
https://github.com/CoryOwens
Cory Owens (CoryOwens)https://github.com/CoryOwens
on Jul 27, 2018https://github.com/microsoft/vscode-python/issues/2268#issue-345303718
Brett Cannon (brettcannon)https://github.com/brettcannon
feature-requestRequest for new features or functionalityhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22feature-request%22
area-formattinghttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22area-formatting%22
needs decisionhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22needs%20decision%22
on Jul 27, 2018https://github.com/microsoft/vscode-python/issues/2268#event-1758189496
https://github.com/weqopy
Fly (weqopy)https://github.com/weqopy
on Jul 30, 2018https://github.com/microsoft/vscode-python/issues/2268#issuecomment-408831423
Don Jayamanne (DonJayamanne)https://github.com/DonJayamanne
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
needs decisionhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22needs%20decision%22
feature-requestRequest for new features or functionalityhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22feature-request%22
on Jul 31, 2018https://github.com/microsoft/vscode-python/issues/2268#event-1763081652
https://github.com/DonJayamanne
Don Jayamanne (DonJayamanne)https://github.com/DonJayamanne
on Jul 31, 2018https://github.com/microsoft/vscode-python/issues/2268#issuecomment-409269355
Brett Cannon (@brettcannon)https://github.com/brettcannon
https://github.com/DonJayamanne
Don Jayamanne (DonJayamanne)https://github.com/DonJayamanne
on Jul 31, 2018https://github.com/microsoft/vscode-python/issues/2268#issuecomment-409269755
Cory Owens (@CoryOwens)https://github.com/CoryOwens
Fly (@weqopy)https://github.com/weqopy
Don Jayamanne (DonJayamanne)https://github.com/DonJayamanne
info-neededIssue requires more information from posterhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22info-needed%22
needs verificationhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22needs%20verification%22
on Jul 31, 2018https://github.com/microsoft/vscode-python/issues/2268#event-1763090665
https://github.com/CoryOwens
Cory Owens (CoryOwens)https://github.com/CoryOwens
on Jul 31, 2018https://github.com/microsoft/vscode-python/issues/2268#issuecomment-409280556
Don Jayamanne (@DonJayamanne)https://github.com/DonJayamanne
https://user-images.githubusercontent.com/8702020/43473662-fe0ee612-94ad-11e8-9d5f-fbe6eab4ddb0.gif
https://github.com/DonJayamanne
Don Jayamanne (DonJayamanne)https://github.com/DonJayamanne
on Aug 3, 2018https://github.com/microsoft/vscode-python/issues/2268#issuecomment-410118929
Brett Cannon (@brettcannon)https://github.com/brettcannon
Don Jayamanne (DonJayamanne)https://github.com/DonJayamanne
feature-requestRequest for new features or functionalityhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22feature-request%22
needs decisionhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22needs%20decision%22
info-neededIssue requires more information from posterhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22info-needed%22
bugIssue identified by VS Code Team member as probable bughttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22bug%22
on Aug 3, 2018https://github.com/microsoft/vscode-python/issues/2268#event-1768993838
https://github.com/Nate-Wilkins
Nate-Wilkins (Nate-Wilkins)https://github.com/Nate-Wilkins
on Sep 20, 2018https://github.com/microsoft/vscode-python/issues/2268#issuecomment-423277603
#730https://github.com/microsoft/vscode-python/issues/730
#845https://github.com/microsoft/vscode-python/pull/845
https://github.com/CoryOwens
Cory Owens (CoryOwens)https://github.com/CoryOwens
on Sep 20, 2018https://github.com/microsoft/vscode-python/issues/2268#issuecomment-423315004
Nate-Wilkins (@Nate-Wilkins)https://github.com/Nate-Wilkins
Brett Cannon (brettcannon)https://github.com/brettcannon
volunteerhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22volunteer%22
needs decisionhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22needs%20decision%22
on Sep 24, 2018https://github.com/microsoft/vscode-python/issues/2268#event-1864349574
https://github.com/brettcannon
Brett Cannon (brettcannon)https://github.com/brettcannon
on Sep 24, 2018https://github.com/microsoft/vscode-python/issues/2268#issuecomment-424148534
Brett Cannon (brettcannon)https://github.com/brettcannon
completedhttps://github.com/microsoft/vscode-python/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Sep 24, 2018https://github.com/microsoft/vscode-python/issues/2268#event-1864350503
lockhttps://github.com/apps/lock
on Oct 22, 2018https://github.com/microsoft/vscode-python/issues/2268#event-1918821409
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/vscode-python/issues/2268
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/vscode-python/issues/2268
area-formattinghttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22area-formatting%22
feature-requestRequest for new features or functionalityhttps://github.com/microsoft/vscode-python/issues?q=state%3Aopen%20label%3A%22feature-request%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.