From 883ea56a6ad7577ac87fce0f64409fc64e09c3e2 Mon Sep 17 00:00:00 2001 From: Biel Stela Date: Wed, 20 Dec 2023 16:32:10 +0100 Subject: [PATCH] moves pre-commit to root --- .pre-commit-config.yaml | 42 ++++++++++++++++++++++++++++++++++++ data/.pre-commit-config.yaml | 42 ------------------------------------ data/pyproject.toml | 11 ++++++++-- 3 files changed, 51 insertions(+), 44 deletions(-) create mode 100644 .pre-commit-config.yaml delete mode 100644 data/.pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..24fdd638d --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,42 @@ +repos: + - repo: https://github.com/gitleaks/gitleaks + rev: v8.17.0 + hooks: + - id: gitleaks-docker + + - repo: https://github.com/abravalheri/validate-pyproject + rev: v0.12.1 + hooks: + - id: validate-pyproject + + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.3.0 + hooks: + - id: end-of-file-fixer + - id: trailing-whitespace + + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.1.4 + hooks: + - id: ruff + args: [--fix] + types_or: [python, pyi, jupyter] + + - id: ruff-format + types_or: [python, pyi, jupyter] + + # - repo: https://github.com/pre-commit/mirrors-mypy + # rev: v1.3.0 + # hooks: + # - id: mypy + # language_version: python + # exclude: tests/.* + # additional_dependencies: + # - types-simplejson + # - types-attrs + # - pydantic~=2.0 + + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v3.0.3 + hooks: + - id: prettier diff --git a/data/.pre-commit-config.yaml b/data/.pre-commit-config.yaml deleted file mode 100644 index 9c442b98a..000000000 --- a/data/.pre-commit-config.yaml +++ /dev/null @@ -1,42 +0,0 @@ -repos: - - repo: https://github.com/gitleaks/gitleaks - rev: v8.17.0 - hooks: - - id: gitleaks-docker - - - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.12.1 - hooks: - - id: validate-pyproject - - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.3.0 - hooks: - - id: end-of-file-fixer - - id: trailing-whitespace - - - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.4 - hooks: - - id: ruff - args: [--fix] - types_or: [python, pyi, jupyter] - - - id: ruff-format - types_or: [python, pyi, jupyter] - - # - repo: https://github.com/pre-commit/mirrors-mypy - # rev: v1.3.0 - # hooks: - # - id: mypy - # language_version: python - # exclude: tests/.* - # additional_dependencies: - # - types-simplejson - # - types-attrs - # - pydantic~=2.0 - - - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.0.3 - hooks: - - id: prettier diff --git a/data/pyproject.toml b/data/pyproject.toml index 0e17d1b7a..a1c73fdbd 100644 --- a/data/pyproject.toml +++ b/data/pyproject.toml @@ -1,4 +1,11 @@ [tool.ruff] -select = ["E", "F", "N", "I"] line-length = 120 -ignore = [] +select = [ + "D1", # pydocstyle errors + "E", # pycodestyle errors + "W", # pycodestyle warnings + "F", # flake8 + "C", # flake8-comprehensions + "B", # flake8-bugbear + "I", # isort +]