Skip to content

Commit

Permalink
Adds pre-commit hooks for black, flake8, isort (#198)
Browse files Browse the repository at this point in the history
* Adds pre-commit hooks for black, flake8, isort

Closes: #194

* Address PR feedback

* Config black to support 160 max line length
  • Loading branch information
chrismoradi authored May 21, 2022
1 parent 27dace6 commit c880c34
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
15 changes: 15 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
default_stages: [push]
repos:
- repo: https://github.com/psf/black
rev: 21.12b0
hooks:
- id: black
args: [--line-length=160]
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,15 @@ If you're feeling curious. You can take a look at a more detailed architecture [

## ⚙️ To Develop Locally

1. Install the development dependencies: `pip install -r dev-requirements.txt`

1. Install the pre-commit git hooks: `pre-commit install`

1. Add more routes in the `integration_tests/base_routes.py` file(if you like).

2. Run `maturin develop` or `maturin develop --cargo-extra-args="--features=io-uring"` (if you want to run the experimental version).
1. Run `maturin develop` or `maturin develop --cargo-extra-args="--features=io-uring"` (if you want to run the experimental version).

3. Run `python3 integration_tests/base_routes.py`
1. Run `python3 integration_tests/base_routes.py`

## 🏃 To Run

Expand Down
1 change: 1 addition & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ black==21.12b0
websockets==10.1
maturin==0.12.11
isort==5.10.1
pre-commit==2.19.0

0 comments on commit c880c34

Please sign in to comment.