diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ce7d01c6..35dad0dd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,6 +3,7 @@ default_install_hook_types: [pre-commit, commit-msg, pre-push] default_stages: [commit] minimum_pre_commit_version: 2.18.0 +exclude: ^.vscode/ repos: diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..6feb0e37 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,9 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=827846 + // for the documentation about the extensions.json format + "recommendations": [ + "bodil.prettier-toml", + "tamasfe.even-better-toml", + "ms-python.python" + ] +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..32414454 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,31 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Python: Module", + "type": "python", + "request": "launch", + "justMyCode": true, + "module": "package" + }, + { + "name": "Python: Run Current File", + "type": "python", + "request": "launch", + "program": "${file}", + "console": "integratedTerminal" + }, + { + "name": "Python: pytest", + "type": "python", + "request": "launch", + "module": "pytest", + "cwd": "${workspaceRoot}", + "env": { + "PYTHONPATH": "./src" + }, + "envFile": "${workspaceRoot}/.env", + "console": "integratedTerminal" + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..d3a43795 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,34 @@ +{ + "[python]": { + "editor.codeActionsOnSave": { + "source.organizeImports": true + } + }, + "python.analysis.extraPaths": [ + "./src/package" + ], + // Linux + "python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python", + // Windows + // "python.defaultInterpreterPath": "${workspaceFolder}/.venv/Scripts/python.exe", + "python.envFile": "${workspaceFolder}/.env", + "python.linting.enabled": true, + "python.linting.banditEnabled": false, + "python.linting.banditArgs": [ + "--configfile=pyproject.toml" + ], + "python.linting.flake8Args": [ + "--config=.flake8" + ], + "python.linting.flake8Enabled": false, + "python.linting.mypyArgs": [ + "--config-file=pyproject.toml" + ], + "python.linting.mypyEnabled": true, + "python.linting.pylintArgs": [ + "--rcfile=pyproject.toml" + ], + "python.linting.pylintEnabled": true, + "python.terminal.activateEnvironment": true, + "python.testing.pytestEnabled": true +}