From acbd0c0370cd876559a82d6bdc6ea5545b8b5ee5 Mon Sep 17 00:00:00 2001 From: Meni Yakove Date: Thu, 11 Apr 2024 17:25:09 +0300 Subject: [PATCH] pre-commit: add mypy --- .pre-commit-config.yaml | 58 +++++++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 25 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0c712ea..373c00b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,39 +1,40 @@ default_language_version: - python: python3 + python: python3 repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: "v4.5.0" hooks: - - id: check-added-large-files - - id: check-docstring-first - - id: check-executables-have-shebangs - - id: check-merge-conflict - - id: check-symlinks - - id: check-yaml - args: - - "--allow-multiple-documents" - # https://github.com/pre-commit/pre-commit-hooks/issues/273 - - "--unsafe" - - id: detect-private-key - - id: mixed-line-ending - - id: debug-statements - - id: trailing-whitespace - args: [--markdown-linebreak-ext=md] # Do not process Markdown files. - - id: end-of-file-fixer - - id: check-ast - - id: check-builtin-literals - - id: check-docstring-first - - id: check-toml + - id: check-added-large-files + - id: check-docstring-first + - id: check-executables-have-shebangs + - id: check-merge-conflict + - id: check-symlinks + - id: check-yaml + args: + - "--allow-multiple-documents" + # https://github.com/pre-commit/pre-commit-hooks/issues/273 + - "--unsafe" + - id: detect-private-key + - id: mixed-line-ending + - id: debug-statements + - id: trailing-whitespace + args: [--markdown-linebreak-ext=md] # Do not process Markdown files. + - id: end-of-file-fixer + - id: check-ast + - id: check-builtin-literals + - id: check-docstring-first + - id: check-toml - repo: https://github.com/PyCQA/flake8 rev: "7.0.0" hooks: - id: flake8 - additional_dependencies: [ - "git+https://github.com/RedHatQE/flake8-plugins.git", - "flake8-mutable", - ] + additional_dependencies: + [ + "git+https://github.com/RedHatQE/flake8-plugins.git", + "flake8-mutable", + ] - repo: https://github.com/Yelp/detect-secrets rev: v1.4.0 @@ -56,3 +57,10 @@ repos: rev: 37.264.0 hooks: - id: renovate-config-validator + + - repo: https://github.com/pre-commit/mirrors-mypy + rev: v1.9.0 + hooks: + - id: mypy + exclude: ^(tests/) + additional_dependencies: [types-all]