Skip to content

Commit 121f14c

Browse files
authored
Merge pull request #72 from KotlinIsland/vscode-config
update vscode config
2 parents b3ae449 + 0035846 commit 121f14c

File tree

3 files changed

+108
-15
lines changed

3 files changed

+108
-15
lines changed

.vscode/extensions.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22
"recommendations": [
33
"ms-python.python",
44
"ms-python.vscode-pylance",
5+
"ms-python.pylint",
6+
"ms-python.black-formatter",
7+
"ms-python.isort",
58
"eamodio.gitlens",
69
"mhutchie.git-graph",
710
"ninoseki.vscode-pylens",
8-
"tamasfe.even-better-toml"
11+
"tamasfe.even-better-toml",
12+
"redhat.vscode-yaml"
913
]
1014
}

.vscode/settings.json

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,17 @@
77
"git.rebaseWhenSync": true,
88
"git.suggestSmartCommit": false,
99
"git.supportCancellation": true,
10+
"git.useEditorAsCommitInput": false,
1011
"diffEditor.ignoreTrimWhitespace": false,
11-
"python.linting.pylintEnabled": true,
12-
"python.linting.mypyArgs": ["--show-column-numbers"],
13-
"python.formatting.provider": "black",
12+
"python.linting.mypyArgs": [
13+
"--show-column-numbers",
14+
"--no-pretty",
15+
"--hide-error-context"
16+
],
17+
"black-formatter.importStrategy": "fromEnvironment",
1418
"python.linting.mypyEnabled": true,
15-
"python.linting.flake8Enabled": true,
1619
"python.linting.enabled": true,
1720
"files.autoSave": "onFocusChange",
18-
"python.linting.pylintCategorySeverity.convention": "Error",
1921
"search.useIgnoreFiles": true,
2022
"git.useCommitInputAsStashMessage": true,
2123
"editor.codeActionsOnSave": {
@@ -25,11 +27,21 @@
2527
"python.linting.flake8CategorySeverity.W": "Error",
2628
"files.eol": "\n",
2729
"python.testing.pytestEnabled": true,
28-
"python.linting.pylintCategorySeverity.refactor": "Error",
29-
"python.linting.pylintCategorySeverity.warning": "Error",
3030
"python.analysis.typeCheckingMode": "off",
31-
"python.analysis.typeshedPaths": [
32-
//TODO: make this not hardcoded https://github.com/microsoft/vscode-python/issues/18233
33-
".venv/lib/site-packages/mypy/typeshed"
34-
]
31+
"python.linting.flake8Enabled": true,
32+
"pylint.severity": {
33+
"convention": "Warning",
34+
"error": "Error",
35+
"fatal": "Error",
36+
"refactor": "Warning",
37+
"warning": "Warning",
38+
"info": "Warning"
39+
},
40+
"pylint.importStrategy": "fromEnvironment",
41+
"yaml.schemas": {
42+
"https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/github-workflow.json": ".github/workflows/*.yaml"
43+
},
44+
"[python]": {
45+
"editor.defaultFormatter": "ms-python.black-formatter"
46+
}
3547
}

.vscode/tasks.json

Lines changed: 80 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,87 @@
11
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
25
"tasks": [
36
{
4-
"label": "task1",
7+
"label": "poetry install requirements",
58
"type": "shell",
6-
"command": "echo",
7-
"args": ["${command:python.interpreterPath}"] //outputs the interpreterpath
9+
"command": "poetry",
10+
"args": ["install"],
11+
"presentation": {
12+
"clear": true
13+
},
14+
"problemMatcher": []
15+
},
16+
{
17+
"label": "poetry update lockfile",
18+
"type": "shell",
19+
"command": "poetry",
20+
"args": ["update"],
21+
"presentation": {
22+
"clear": true
23+
},
24+
"problemMatcher": []
25+
},
26+
{
27+
"label": "poetry refresh lockfile (no update)",
28+
"type": "shell",
29+
"command": "poetry",
30+
"args": ["lock", "--no-update"],
31+
"presentation": {
32+
"clear": true
33+
},
34+
"problemMatcher": []
35+
},
36+
{
37+
"label": "basedmypy - all files",
38+
"type": "shell",
39+
"command": "${command:python.interpreterPath}",
40+
"args": ["-m", "mypy", "-p", "basedtyping", "-p", "tests"],
41+
"presentation": {
42+
"clear": true
43+
},
44+
"problemMatcher": []
45+
},
46+
{
47+
"label": "flake8 - all files",
48+
"type": "shell",
49+
"command": "${command:python.interpreterPath}",
50+
"args": ["-m", "flake8"],
51+
"presentation": {
52+
"clear": true
53+
},
54+
"problemMatcher": []
55+
},
56+
{
57+
"label": "pylint - all files",
58+
"type": "shell",
59+
"command": "${command:python.interpreterPath}",
60+
"args": ["-m", "pylint", "basedtyping", "tests"],
61+
"presentation": {
62+
"clear": true
63+
},
64+
"problemMatcher": []
65+
},
66+
{
67+
"label": "isort - all files",
68+
"type": "shell",
69+
"command": "${command:python.interpreterPath}",
70+
"args": ["-m", "isort", "--diff", "--color", "."],
71+
"presentation": {
72+
"clear": true
73+
},
74+
"problemMatcher": []
75+
},
76+
{
77+
"label": "black - all files",
78+
"type": "shell",
79+
"command": "${command:python.interpreterPath}",
80+
"args": ["-m", "black", "--color", "."],
81+
"presentation": {
82+
"clear": true
83+
},
84+
"problemMatcher": []
885
}
986
]
1087
}

0 commit comments

Comments
 (0)