diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..2a38127 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,20 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files +- repo: https://github.com/psf/black + rev: 24.4.2 + hooks: + - id: black +- repo: https://github.com/codespell-project/codespell + rev: v2.3.0 + hooks: + - id: codespell + additional_dependencies: + - tomli diff --git a/pyproject.toml b/pyproject.toml index 9f800e1..a5e1b22 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,6 +28,10 @@ dynamic = ["version"] bkbit = "bkbit.cli:cli" [project.optional-dependencies] +dev = [ + "black", + "pre-commit", +] test = [ "pytest", ] @@ -35,11 +39,18 @@ docs = [ "mkdocs-material" ] +all = [ + "bkbit[dev]", + "bkbit[docs]", + "bkbit[test]", +] + [project.urls] "Homepage" = "https://github.com/brain-bican/bkbit" [tool.setuptools_scm] write_to = "bkbit/_version.py" + [tool.codespell] # Ref: https://github.com/codespell-project/codespell#using-a-config-file skip = '.git*'