From 101b732ae0652d66bd6e4de804879529595b8cc2 Mon Sep 17 00:00:00 2001 From: Dov Benyomin Sohacheski Date: Wed, 22 Feb 2023 09:45:32 +0000 Subject: [PATCH] added precommit --- .pre-commit-config.yaml | 40 ++++++++++++++++++++++++++++++++++++++++ pyproject.toml | 1 + 2 files changed, 41 insertions(+) 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..2ffe41c4 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,40 @@ +repos: + # - repo: https://github.com/pycqa/isort + # rev: 5.12.0 + # hooks: + # - id: isort + # name: Run isort to sort imports in Python files + + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-yaml + - id: check-toml + - id: end-of-file-fixer + - id: mixed-line-ending + - id: trailing-whitespace + args: [ --markdown-linebreak-ext=md ] + + - repo: https://github.com/codespell-project/codespell + rev: v2.2.2 + hooks: + - id: codespell + args: [ --write-changes ] + + - repo: https://github.com/psf/black + rev: 23.1.0 + hooks: + - id: black + name: Run black (python formatter) + + - repo: https://github.com/charliermarsh/ruff-pre-commit + rev: v0.0.198 + hooks: + - id: ruff + + # - repo: https://github.com/pre-commit/mirrors-mypy + # rev: v0.991 + # hooks: + # - id: mypy + # args: [ . ] + # pass_filenames: false \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 3bac35b1..d8061521 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,6 +22,7 @@ pylint = "^2.7" rope = "^0.14.0" isort = "^4.3" black = "^22.12.0" +pre-commit = "^3.0.4" [tool.black] line-length = 120