Skip to content

Commit c5032b5

Browse files
authored
Add pre-commit (#28)
1 parent 7188fa2 commit c5032b5

File tree

4 files changed

+242
-1
lines changed

4 files changed

+242
-1
lines changed

.pre-commit-config.yaml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.0.1
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: check-added-large-files
7+
- id: end-of-file-fixer
8+
- id: mixed-line-ending
9+
args: ["--fix=lf"]
10+
11+
- repo: https://github.com/pre-commit/mirrors-isort
12+
rev: v5.8.0
13+
hooks:
14+
- id: isort
15+
args:
16+
[
17+
"--multi-line=3",
18+
"--trailing-comma",
19+
"--force-grid-wrap=0",
20+
"--use-parentheses",
21+
"--line-width=88",
22+
]
23+
24+
- repo: https://github.com/humitos/mirrors-autoflake.git
25+
rev: v1.1
26+
hooks:
27+
- id: autoflake
28+
args: ["--in-place", "--remove-all-unused-imports"]
29+
30+
- repo: https://github.com/psf/black
31+
rev: 21.9b0
32+
hooks:
33+
- id: black
34+
- repo: https://github.com/pre-commit/mirrors-prettier
35+
rev: v2.4.1
36+
hooks:
37+
- id: prettier

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ await client.from_("countries").eq("name", "Việt Nam").delete().execute()
9191
$ git clone https://github.com/supabase/postgrest-py.git
9292
$ cd postgrest-py
9393
$ poetry install
94+
$ poetry run pre-commit install
9495
```
9596

9697
### Testing

0 commit comments

Comments
 (0)