Create a Project

cd dir/repos
mkdir project_name
cd project_name
code .

An Environment with a Specific Python Version

Init Git

Create README

VSCode Setting According to Pre-commit Config

{
    "python.envFile": "${workspaceFolder}/.env",
    // testing
    "python.testing.unittestEnabled": false,
    "python.testing.pytestEnabled": true,
    "python.testing.pytestArgs": [
        "-s",
        "tests"
    ],
    // isort
    "isort.check": true,
    "isort.args": [
        "--profile",
        "black"
    ],
    // format
    "python.formatting.provider": "black",
    "python.formatting.blackArgs": [
        "--line-length=100"
    ],
    // linting
    "python.linting.enabled": true,
    "python.linting.flake8Enabled": true,
    "python.linting.flake8Args": [
        "--max-line-length=100",
        "--ignore=W503,E203",
    ],
    // Code Spell Checker
    "cSpell.enabled": true,
    "cSpell.language": "en",
    "cSpell.maxNumberOfProblems": 100,
    "cSpell.numSuggestions": 8,
    "cSpell.minWordLength": 4,
    "cSpell.enabledLanguageIds": [
        "python",
        "markdown",
        "plaintext",
        "yml",
        "json"
    ],
    "cSpell.allowCompoundWords": false,
    "cSpell.ignoreWords": [],
    "cSpell.userWords": [],
    "cSpell.ignorePaths": [
        ".venv",
        "data"
    ],
    "cSpell.flagWords": [
        "hte",
        "fuck"
    ]
}

Init Virtual Environment

# use project venv to install minimal dependencies
pip install virtualenv
virtualenv .venv
source venv/bin/activate