Skip to content

Commit

Permalink
Add pre-commit (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
anand2312 committed Oct 27, 2021
1 parent 7188fa2 commit c5032b5
Show file tree
Hide file tree
Showing 4 changed files with 242 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .pre-commit-config.yaml
@@ -0,0 +1,37 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: trailing-whitespace
- id: check-added-large-files
- id: end-of-file-fixer
- id: mixed-line-ending
args: ["--fix=lf"]

- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.8.0
hooks:
- id: isort
args:
[
"--multi-line=3",
"--trailing-comma",
"--force-grid-wrap=0",
"--use-parentheses",
"--line-width=88",
]

- repo: https://github.com/humitos/mirrors-autoflake.git
rev: v1.1
hooks:
- id: autoflake
args: ["--in-place", "--remove-all-unused-imports"]

- repo: https://github.com/psf/black
rev: 21.9b0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.4.1
hooks:
- id: prettier
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -91,6 +91,7 @@ await client.from_("countries").eq("name", "Việt Nam").delete().execute()
$ git clone https://github.com/supabase/postgrest-py.git
$ cd postgrest-py
$ poetry install
$ poetry run pre-commit install
```

### Testing
Expand Down

0 comments on commit c5032b5

Please sign in to comment.