mirror of
https://github.com/tiny-pilot/tinypilot.git
synced 2023-10-01 22:58:29 +03:00
Configure VS Code to auto-format code with YAPF (#707)
This commit is contained in:
2
.style.yapf
Normal file
2
.style.yapf
Normal file
@@ -0,0 +1,2 @@
|
||||
[style]
|
||||
based_on_style = google
|
||||
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@@ -5,8 +5,10 @@
|
||||
"editor.formatOnSave": false
|
||||
},
|
||||
"[python]": {
|
||||
"editor.defaultFormatter": "ms-python.python",
|
||||
"editor.tabSize": 4
|
||||
},
|
||||
"python.formatting.provider": "yapf",
|
||||
"python.linting.pylintEnabled": true,
|
||||
"python.linting.enabled": true,
|
||||
"python.linting.lintOnSave": true
|
||||
|
||||
2
.yapfignore
Normal file
2
.yapfignore
Normal file
@@ -0,0 +1,2 @@
|
||||
third_party/*
|
||||
venv/*
|
||||
@@ -32,13 +32,7 @@ coverage run \
|
||||
coverage report
|
||||
|
||||
# Check that source has correct formatting.
|
||||
yapf \
|
||||
--diff \
|
||||
--recursive \
|
||||
--style google \
|
||||
./ \
|
||||
--exclude=third_party/* \
|
||||
--exclude=venv/*
|
||||
yapf --diff --recursive ./
|
||||
|
||||
# Check correct sorting for imports.
|
||||
isort \
|
||||
|
||||
Reference in New Issue
Block a user