Skip to content

Commit a40cf9c

Browse files
committed
Add black and format python code
1 parent cd219c7 commit a40cf9c

32 files changed

Lines changed: 1673 additions & 1439 deletions

.vscode/settings.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,16 @@
1414
"editor.formatOnSave": true
1515
},
1616
"[python]": {
17-
"editor.formatOnSave": false,
18-
"editor.defaultFormatter": "ms-python.python",
19-
"editor.codeActionsOnSave": []
17+
"editor.rulers": [88],
18+
"editor.formatOnSave": true,
19+
"editor.defaultFormatter": "ms-python.black-formatter",
20+
"editor.codeActionsOnSave": ["source.organizeImports", "source.fixAll.black"]
2021
},
2122
"editor.codeActionsOnSave": [
2223
// Run ESLint fixers _before_ prettier to ensure the user doesn't need to do multiple saves
2324
"source.organizeImports",
2425
"source.fixAll.eslint",
25-
"source.fixAll.format",
26+
"source.fixAll.format"
2627
],
2728
"explorer.excludeGitIgnore": true,
2829
"search.exclude": {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"knip:check": "yarn knip",
1717
"prettier:check": "prettier --config package.json --check 'src/**'",
1818
"prettier:fix": "prettier --config package.json --write 'src/**'",
19-
"pylint:check": "poetry run ruff check ./python",
19+
"pylint:check": "poetry run ruff check ./python && poetry run black ./python",
2020
"pylint:fix": "poetry run ruff check --fix ./python",
2121
"lint:check": "eslint --ext .js,.ts,.tsx ./src",
2222
"lint:fix": "eslint --fix --ext .js,.ts,.tsx ./src",

0 commit comments

Comments
 (0)