2
をerroringされる - 私はフォーマットを打ったときに何も起こりません:フォーマットは黙っyapfで、Python拡張を使用して
- VSCodeバージョン:1.0.0
- OSバージョン:OSX 10.11.4
マイワークスペースの設定:私が撮った
// Place your settings in this file to overwrite the default settings
{
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/js-build": true
},
"editor.scrollBeyondLastLine": false,
"python.pythonPath": "/Users/joshma/.envs/venv/bin/python",
"python.linting.flake8Path": "/Users/joshma/.envs/venv/bin/flake8",
"python.linting.pylintEnabled": false,
"python.linting.flake8Enabled": true,
"editor.formatOnType": true,
"python.formatting.provider": "yapf",
"python.formatting.yapfPath": "/Users/joshma/.envs/venv/bin/yapf"
}
手順:
-
は
- するライン
cat path/to/file.py | yapf
フォーマットを実行すると、ファイル全体、CMDの+シフト+ P、フォーマットコードを選択していることを確認しfoo('a' )
- に関数呼び出しを書き換え
- 。
- 何も起こりません:(
foo('a')
それは私がいくつかのパス/設定が正しく設定されていない可能です - これをデバッグするいくつかの方法がある
python出力ウィンドウの内容を確認してください。エラーがあれば、そこに表示されます。 – Don