ksuhail7 / python-linting-formatting

Use Black, Flake8, isort, and Git Hooks for automatic linting and formatting.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

python-linting-formatting

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.

Automated Gitpod Installation

Navigate to gitpod.io#https://github.com/[YOUR_GITHUB_USERNAME]/python-linting-formatting. Once you create an account, your workspace should be configured automatically.

Local Installation

Create a virtual environment

The following command will create a virtual environment called .venv in your current directory.

$ python3 -m venv .venv

Activate the environment

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!'

Deactivate virtual environment

Use the following command to deactivate your virtual environment.

$ (venv) deactivate

Install dependencies

After you activate your virtual environment, the following command will install the required dependencies.

$ (venv) pip install -r requirements

About

Use Black, Flake8, isort, and Git Hooks for automatic linting and formatting.

License:MIT License


Languages

Language:Python 100.0%