-
Notifications
You must be signed in to change notification settings - Fork 1
/
python-settings.ts
41 lines (37 loc) · 1.49 KB
/
python-settings.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { GitPrecommitScript } from "./git-settings.ts";
import type { Extension, Settings } from "./vscode-settings.ts";
import { commonExtensions, commonSettings } from "./vscode-settings.ts";
export interface PythonSettings {
"explorer.openEditors.visible": 0;
"terminal.integrated.shell.linux": string;
"terminal.integrated.fontFamily": string;
"python.formatting.provider": string;
"python.formatting.blackArgs": string[];
"python.linting.enabled": boolean;
"python.linting.pylintEnabled": boolean;
"python.linting.mypyEnabled": boolean;
"python.linting.lintOnSave": boolean;
}
export const pythonSettings: Settings & PythonSettings = {
...commonSettings,
"explorer.openEditors.visible": 0,
"terminal.integrated.shell.linux": "/bin/zsh",
"terminal.integrated.fontFamily": "CascadianCode NF",
"python.formatting.provider": "black",
"python.formatting.blackArgs": ["--line-length", "100"],
"python.linting.enabled": true,
"python.linting.pylintEnabled": false,
"python.linting.mypyEnabled": true,
"python.linting.lintOnSave": true,
};
export const pythonExtensions: Extension[] = [
...commonExtensions,
{ marketplaceId: "ms-python.python" },
{ marketplaceId: "ms-python.vscode-pylance" },
{ marketplaceId: "mechatroner.rainbow-csv" },
{ marketplaceId: "esbenp.prettier-vscode" },
{ marketplaceId: "eamodio.gitlens" },
{ marketplaceId: "bungcip.better-toml" },
];
export const pythonGitPrecommitScript: GitPrecommitScript =
`find . -type f -name "*.py" | xargs pylint `;