From 16734a17ad281f77d3bd4ca7889eaa7c6348ce57 Mon Sep 17 00:00:00 2001 From: Thomas Mangin Date: Fri, 25 Oct 2024 16:05:09 +0100 Subject: [PATCH] add pre-commit --- .pre-commit-config.yaml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9f7a5af9b..e050e0415 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,13 +1,17 @@ repos: - - repo: https://github.com/psf/black - rev: stable + - repo: https://github.com/astral-sh/ruff-pre-commit + # Ruff version. + rev: v0.7.1 hooks: - - id: black - language_version: python3.8 - args: [--line-length=120, --skip-string-normalization,--exclude=lib/exabgp/vendoring] + # Run the linter. + - id: ruff + args: [--fix --exclude lib/exabgp/vendoring] + # Run the formatter. + - id: ruff-format - repo: https://github.com/pre-commit/pre-commit-hooks rev: v1.2.3 hooks: - id: flake8 + args: [--exclude src/exabgp/vendoring] additional_dependencies: [flake8-bugbear]