Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autoformat doesn't work after start #492

Closed
zjjott opened this issue Dec 29, 2017 · 8 comments
Closed

autoformat doesn't work after start #492

zjjott opened this issue Dec 29, 2017 · 8 comments
Assignees
Labels
area-formatting bug Issue identified by VS Code Team member as probable bug
Milestone

Comments

@zjjott
Copy link

zjjott commented Dec 29, 2017

Environment data

VS Code version: 1.19.1
Python Extension version: 0.9.1
Python Version: Python 3.6.1 (v3.6.1:69c0db5050, Mar 21 2017, 01:21:04)
OS and version: macOS 10.13.2

Actual behavior

autoformat when save python file that using autopep8,it works when just start for a while,but after about ten secords,it doesn't format file

Expected behavior

Steps to reproduce:

I don't know how to reproduce,but all my vscode:MacOS、windows、Linux, have this issue

$ code --list-extensions
AlanWalk.markdown-toc
HookyQR.beautify
bibhasdn.unique-lines
dmitry-korobchenko.prototxt
gerane.Theme-Blackboard
itryapitsin.Scala
lukehoban.Go
magicstack.MagicPython
mkloubert.vs-deploy
ms-python.python
ms-vscode.cpptools
ms-vscode.sublime-keybindings
msjsdiag.debugger-for-chrome
patrys.vscode-code-outline
sensourceinc.vscode-sql-beautify
zhuangtongfa.Material-theme

Logs

Output from Python output panel
none of output

Output from Console window (Help->Developer Tools menu)

15  console.ts:123 [Extension Host] (node:33010) DeprecationWarning: Calling an asynchronous function without callback is deprecated.

t.log @ console.ts:123
t._logExtensionHostMessage @ extensionHost.ts:391
(anonymous) @ extensionHost.ts:211
emitTwo @ events.js:106
emit @ events.js:194
process.nextTick @ internal/child_process.js:766
_combinedTickCallback @ internal/process/next_tick.js:73
_tickCallback @ internal/process/next_tick.js:104

is it cause by this console error?

@zjjott
Copy link
Author

zjjott commented Jan 2, 2018

@DonJayamanne here

@brettcannon
Copy link
Member

@zjjott "here" what?

@brettcannon
Copy link
Member

So are you saying you can reformat files for about 10 seconds (which is really specific and fast to notice a reformat), but then it simply stops working? And can you tell us what settings you have turned on for auto-formatting on save?

@brettcannon brettcannon added info-needed Issue requires more information from poster area-formatting bug Issue identified by VS Code Team member as probable bug labels Jan 2, 2018
@zjjott
Copy link
Author

zjjott commented Jan 3, 2018

@brettcannon no,I mean vscode can autoformat python file,only when I just open vscode or just modify any settings.
autopep8 doesn't behavior after a while and when I save python file, console have error like this:

15  console.ts:123 [Extension Host] (node:33010) DeprecationWarning: Calling an asynchronous function without callback is deprecated.

t.log @ console.ts:123
t._logExtensionHostMessage @ extensionHost.ts:391
(anonymous) @ extensionHost.ts:211
emitTwo @ events.js:106
emit @ events.js:194
process.nextTick @ internal/child_process.js:766
_combinedTickCallback @ internal/process/next_tick.js:73
_tickCallback @ internal/process/next_tick.js:104

all my setting is that:

{
  "editor.fontSize": 18,
  "terminal.integrated.fontSize": 20,
  // "editor.wordWrap": "bounded",
  "editor.fontFamily": "Monaca, Menlo, Monaco, 'Courier New'",
  "workbench.colorTheme": "Blackboard",
  "workbench.editor.enablePreview": false,
  "editor.snippetSuggestions": "top",
  "python.venvPath": "${workspaceRoot}/venv,${workspaceRoot}/.env3,${workspaceRoot}/.env",
  "python.envFile": "",
  "editor.wordWrap": "on",
  "editor.tabCompletion": true,
  "python.linting.flake8Enabled": true,
  "python.linting.pylintEnabled": false,
  "python.linting.enabledWithoutWorkspace": true,
  "files.exclude": {
    "**/.git": true,
    "**/.svn": true,
    "**/.hg": true,
    "**/CVS": true,
    "**/*.pyc": true,
    "**/__pycache__": true
  },
  "files.watcherExclude": {
    "**/.git/objects/**": true,
    "**/__pycache__": true,
    "**/node_modules/**": true
  },
  "window.zoomLevel": -1,
  "go.buildOnSave": "off",
  "go.formatTool": "gofmt",
  "go.autocompleteUnimportedPackages": true,
  "go.useCodeSnippetsOnFunctionSuggest": true,
  "go.goroot": "/usr/local/go",
  "python.linting.flake8Args": [
    "--exclude=.env",
    "--exclude=.env3"
  ],
  "sublimeTextKeymap.promptV3Features": true,
  "editor.multiCursorModifier": "ctrlCmd",
  "editor.formatOnPaste": true,
  "editor.formatOnSave": true,
  "search.exclude": {
    "**/node_modules": true,
    "**/bower_components": true,
    ".env/**": false,
    ".env3/**": false
  },
  "[python]": {
    "editor.formatOnSave": true
  },
  "explorer.confirmDelete": false,
}

BTW,as you can see, I have setting formatOnPaste, and it works well, but formatOnSave not

@MikhailArkhipov
Copy link

May be same as #418

@brettcannon brettcannon added awaiting 1-verification and removed info-needed Issue requires more information from poster labels Jan 3, 2018
@MikhailArkhipov MikhailArkhipov self-assigned this Jan 8, 2018
@alete89
Copy link

alete89 commented Jan 17, 2018

may be related with #590 ?

@MikhailArkhipov
Copy link

Most probably same as #590 which is vscode issue.

@MikhailArkhipov
Copy link

94cd778

@lock lock bot locked as resolved and limited conversation to collaborators Jul 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-formatting bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

4 participants