Mount-Mockery - vscode

VS-Code

Shortcuts

Strg+"g" Springe zu Zeile
Strg+"P" VSCODE Command Palette...

Plugins

General

Python

Ansible

LaTeX

Settings (.vscode/settings.json)

autopep8:

  "autopep8.args": ["--max-line-length=150"],
  "python.formatting.provider": "none",
  "[python]": {
    "editor.defaultFormatter": "ms-python.autopep8",
    "editor.formatOnSave": true
  },
  "editor.formatOnSave": true,

font-size

  "editor.fontSize": 16,

djangos

  "emmet.includeLanguages": { "django-html": "html" },

pytest

Add an empty conftest.py in src-root, put your tests to <src-root>/__test__.

  "python.testing.pytestArgs": ["-v", "--cov", "--cov-report=xml", "__test__"],
  "python.testing.unittestEnabled": false,
  "python.testing.pytestEnabled": true

default interpreter

  "python.defaultInterpreterPath": "./venv/bin/python",

Launch configuration (<src-root>/.vscode/launch.json)

{
    // Verwendet IntelliSense zum Ermitteln möglicher Attribute.
    // Zeigen Sie auf vorhandene Attribute, um die zugehörigen Beschreibungen anzuzeigen.
    // Weitere Informationen finden Sie unter https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Main File execution",
            "type": "python",
            "request": "launch",
            "program": "${workspaceFolder}/<FILE_TO_BE_EXECUTED>",
            "console": "integratedTerminal",
            "justMyCode": true
        }
    ]
}