From 3bc8a2f44a31f12494de1ad1d64c7f5e8511dbd7 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Wed, 16 Feb 2022 20:01:26 -0300 Subject: [PATCH] Disabled some pre-commit checks and configured others --- .bandit | 1 + .pre-commit-config.yaml | 47 +++++++++++++++++++++++------------------ 2 files changed, 27 insertions(+), 21 deletions(-) diff --git a/.bandit b/.bandit index f46641c1..2560c207 100644 --- a/.bandit +++ b/.bandit @@ -1,2 +1,3 @@ [bandit] skips = B101,B102,B105,B301,B303,B310,B318,B401,B403,B404,B405,B408,B314,B602,B603,B604,B606,B607 +exclude = submodules/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 23486ea8..61f51fd7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,8 @@ files: exclude: (?x)^( .*error.*\.yaml| - experiments/.* + experiments/.*| + submodules/.* )$ repos: - repo: https://github.com/pre-commit/pre-commit-hooks @@ -39,14 +40,16 @@ repos: hooks: - id: yamllint args: [-c, .yamllint] - - repo: https://github.com/asottile/pyupgrade - rev: v2.31.0 - hooks: - - id: pyupgrade - - repo: https://github.com/psf/black - rev: 22.1.0 - hooks: - - id: black +# I see no point in making the code more incompatible with older Python +# - repo: https://github.com/asottile/pyupgrade +# rev: v2.31.0 +# hooks: +# - id: pyupgrade +# Too intrusive +# - repo: https://github.com/psf/black +# rev: 22.1.0 +# hooks: +# - id: black - repo: https://github.com/Lucas-C/pre-commit-hooks-bandit rev: v1.0.5 hooks: @@ -55,20 +58,22 @@ repos: rev: v0.3.1 hooks: - id: autoflake8 - - repo: https://github.com/PyCQA/flake8 - rev: 3.9.2 - hooks: - - id: flake8 - - repo: https://github.com/PyCQA/isort - rev: 5.10.1 - hooks: - - id: isort +# Flake8 is run outside and here the config doesn't work +# - repo: https://github.com/PyCQA/flake8 +# rev: 3.9.2 +# hooks: +# - id: flake8 +# Sorting imports is dangerous. +# - repo: https://github.com/PyCQA/isort +# rev: 5.10.1 +# hooks: +# - id: isort - repo: https://github.com/codespell-project/codespell rev: v2.1.0 hooks: - id: codespell - - repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.931 - hooks: - - id: mypy +# - repo: https://github.com/pre-commit/mirrors-mypy +# rev: v0.931 +# hooks: +# - id: mypy # TODO: mdformat --wrap 75 README.md --number