From a78d1d67202dc96800fcdf750426f993ae0b1f67 Mon Sep 17 00:00:00 2001 From: Filippo Luca Ferretti Date: Thu, 15 Feb 2024 11:47:28 +0100 Subject: [PATCH] Add pre-commit configuration --- .pre-commit-config.yaml | 21 +++++++++++++++++++++ setup.cfg | 1 + 2 files changed, 22 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 000000000..fc6f215ce --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,21 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.5.0 + hooks: + - id: check-ast + - id: check-merge-conflict + - id: check-yaml + - id: end-of-file-fixer + - id: trailing-whitespace + + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 24.2.0 + hooks: + - id: black + language_version: python3.11 + + - repo: https://github.com/pycqa/isort + rev: 5.13.2 + hooks: + - id: isort + name: isort (python) diff --git a/setup.cfg b/setup.cfg index fa3c714f8..633d071e0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -67,6 +67,7 @@ where = src style = black[jupyter] isort + pre-commit testing = idyntree pytest >= 6.0