From 645cd3573c5e964ace71e6c1e30a559cc7aeb48e Mon Sep 17 00:00:00 2001 From: Cagri Yonca Date: Thu, 24 Oct 2024 13:12:31 +0200 Subject: [PATCH] pre-commit: added pre-commit-feature with ruff linter Signed-off-by: Cagri Yonca --- .pre-commit-config.yaml | 10 ++++++++++ pyproject.toml | 2 ++ 2 files changed, 12 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..567ad81d --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,10 @@ +repos: +- repo: https://github.com/astral-sh/ruff-pre-commit + # Ruff version. + rev: v0.7.0 + hooks: + # Run the linter. + - id: ruff + args: [ --fix ] + # Run the formatter. + - id: ruff-format diff --git a/pyproject.toml b/pyproject.toml index cbdf11f7..8572ce31 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,6 +63,8 @@ dev = [ "pytest", "pytest-cov", "pytest-mock", + "pre-commit>=3.0.0", + "ruff" ] [project.urls]