Skip to content

Commit

Permalink
Add pre-commit-config
Browse files Browse the repository at this point in the history
For formatting and linting.
  • Loading branch information
fsouza committed Aug 15, 2023
1 parent 35bcb87 commit 39b3dd6
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black

- repo: https://github.com/asottile/reorder_python_imports
rev: v3.10.0
hooks:
- id: reorder-python-imports
args:
- "--py38-plus"

- repo: https://github.com/asottile/pyupgrade
rev: v3.10.1
hooks:
- id: pyupgrade
args:
- "--py38-plus"

- repo: https://github.com/asottile/add-trailing-comma
rev: v3.0.1
hooks:
- id: add-trailing-comma

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.282
hooks:
- id: ruff
2 changes: 2 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
exclude = ["docs"]
line-length = 120

0 comments on commit 39b3dd6

Please sign in to comment.