Skip to content

Instantly share code, notes, and snippets.

@umonaca
Last active November 18, 2021 16:53
Show Gist options
  • Save umonaca/a02e1df3a3a680dca45cdf288027677f to your computer and use it in GitHub Desktop.
Save umonaca/a02e1df3a3a680dca45cdf288027677f to your computer and use it in GitHub Desktop.
VS Code Settings for Python with Formatters and Linters

VS Code settings with Formatters and Linters

Tools / Packages

  • Black
  • Flake8
  • mypy
  • isort
  • darglint

.vscode/settings.json

{
    "workbench.colorCustomizations": {
        "editorRuler.foreground": "#ff4081"
    },
    "python.linting.pylintEnabled": false,
    "python.linting.enabled": true,
    "python.formatting.provider": "black",
    "editor.formatOnSave": true,
    "python.linting.flake8Enabled": true,
    "python.linting.mypyEnabled": true,
    "python.linting.mypyArgs": [
        "--ignore-missing-imports",
        "--follow-imports=silent",
        "--show-column-numbers",
        "--strict"
    ],
    "[python]": {
        "editor.codeActionsOnSave": {
            "source.organizeImports": true
        },
        "editor.rulers": [
            80,
        ],
    },
    "python.sortImports.args": [
        "--profile", "black"
    ]
}

Tests

  • pytest
  • pytest-cov
  • pytest-mock
  • tox
  • responses (for requests)

Bump version

  • tbump

Spinx

  • sphinx_rtd_theme
  • sphinx_autodoc_typehints
  • sphinxcontrib-napoleon
  • rstcheck (for VS Code plugin)

Google Style Guide

https://google.github.io/styleguide/pyguide.html

conda and conda-forge

https://levelup.gitconnected.com/publishing-your-python-package-on-conda-and-conda-forge-309a405740cf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment