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]