From d77dc68119c281b3943b40a304ff4c7a162af60d Mon Sep 17 00:00:00 2001 From: mauwii Date: Sat, 18 Feb 2023 14:42:03 +0100 Subject: [PATCH] better config of pre-commit hooks: - better order of hooks - add flake8-comprehensions and flake8-simplify - remove unecesarry hooks which are covered by previous hooks - add hooks - check-executables-have-shebangs - check-shebang-scripts-are-executable --- .pre-commit-config.yaml | 42 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bf4fb65b39..636600ba4d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,29 +1,6 @@ # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks repos: - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 - hooks: - - id: check-added-large-files - - id: check-ast - - id: check-executables-have-shebangs - - id: check-json - - id: check-merge-conflict - - id: check-symlinks - - id: check-toml - - id: check-yaml - args: ['--unsafe'] - - id: end-of-file-fixer - # files: \.(py|sh|rst|md|yml|yaml)$ - exclude: \.(json|jsonc|js|map)$ - - id: trailing-whitespace - exclude: \.(json|jsonc|js|map)$ - - - repo: https://github.com/pre-commit/mirrors-prettier - rev: 'v3.0.0-alpha.4' - hooks: - - id: prettier - - repo: https://github.com/psf/black rev: 23.1.0 hooks: @@ -41,3 +18,22 @@ repos: additional_dependencies: - flake8-black - flake8-bugbear + - flake8-comprehensions + - flake8-simplify + + - repo: https://github.com/pre-commit/mirrors-prettier + rev: 'v3.0.0-alpha.4' + hooks: + - id: prettier + + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-added-large-files + - id: check-executables-have-shebangs + - id: check-shebang-scripts-are-executable + - id: check-merge-conflict + - id: check-symlinks + - id: check-toml + - id: end-of-file-fixer + - id: trailing-whitespace