From 01db9417fa89d3736f85911f0f2195e30563a802 Mon Sep 17 00:00:00 2001 From: Chang She <759245+changhiskhan@users.noreply.github.com> Date: Wed, 22 Mar 2023 17:59:15 -0700 Subject: [PATCH] add ruff and black pre-commit hook --- .pre-commit-config.yaml | 11 +++++++++++ python/pyproject.toml | 8 +++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..834faae6 --- /dev/null +++ b/.pre-commit-config.yaml @@ -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 \ No newline at end of file diff --git a/python/pyproject.toml b/python/pyproject.toml index 06ead89e..b668fd60 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -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]