Skip to content

Commit

Permalink
feat: add pre-commit linter config file
Browse files Browse the repository at this point in the history
  • Loading branch information
paoloyx committed Jul 3, 2024
1 parent 63ac8c6 commit 4715f1e
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
default_language_version:
python: python3.11
default_stages: [pre-commit, push]
exclude: >
(?x)^(
api/alembic|
api/.venv|
api/tests|
sdk|
spark|
ui
)$
repos:
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.2.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
args: []
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.8
hooks:
- id: ruff
args: [--config=api/pyproject.toml, --fix]
files: ^((api/app)/.+)?[^/]+\.(py)$
- id: ruff-format
args: [--config=api/pyproject.toml]
files: ^((api/app)/.+)?[^/]+\.(py)$

0 comments on commit 4715f1e

Please sign in to comment.