add ruff and black pre-commit hook

This commit is contained in:
Chang She
2023-03-22 17:59:15 -07:00
parent aeb3c52c8c
commit 01db9417fa
2 changed files with 18 additions and 1 deletions

11
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,11 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black

View File

@@ -37,7 +37,13 @@ repository = "https://github.com/eto-ai/lancedb"
[project.optional-dependencies]
tests = [
"pytest",
"pytest"
]
dev = [
"ruff", "pre-commit", "black"
]
docs = [
"mkdocs", "mkdocs-material", "mkdocstrings[python]"
]
[build-system]