This is the starter repo for a demo that will show how to use Black, Flake8, isort, and Git Hooks for automatic linting and formatting.
This repo should not be used directly. Instead, fork this repo and clone your copy instead.
Navigate to gitpod.io#https://github.com/[YOUR_GITHUB_USERNAME]/python-linting-formatting
. Once you create an account, your workspace should be configured automatically.
The following command will create a virtual environment called .venv
in your current directory.
$ python3 -m venv .venv
The following commands activate an existing virtual environment on Windows and Unix systems. The command assumes that the virtual environment is named .venv
.
# Windows (CMD.exe)
$ .venv\Scripts\activate.bat
# Unix
$ source .venv/bin/activate
Once activated, your prompt should prepend the name of the virtual environment, as shown below.
$ (venv) echo 'Hello, World!'
Use the following command to deactivate your virtual environment.
$ (venv) deactivate
After you activate your virtual environment, the following command will install the required dependencies.
$ (venv) pip install -r requirements