From 28bea22be7cd745f51f52f8697b936ed0d5f2782 Mon Sep 17 00:00:00 2001 From: Patrik Lindgren <21142447+ggravlingen@users.noreply.github.com> Date: Fri, 24 Jun 2022 13:17:10 +0000 Subject: [PATCH] Fix pre-commit --- .pre-commit-config.yaml | 28 +++++++++++++++++----------- requirements_test.txt | 16 ++++++++-------- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7685ca4..187583d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,13 @@ repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.3.0 + hooks: + - id: requirements-txt-fixer + - id: check-json + exclude: (.vscode|.devcontainer) + - id: no-commit-to-branch + args: + - --branch=master - repo: https://github.com/psf/black rev: 22.3.0 hooks: @@ -8,17 +17,6 @@ repos: - --safe - --quiet files: ^(pygleif|examples|tests)/.+\.py$ - - repo: https://github.com/pycqa/flake8 - rev: 4.0.1 - hooks: - - id: flake8 - name: flake8 - entry: flake8 - additional_dependencies: - - flake8-docstrings==1.6.0 - - flake8-comprehensions==3.5.0 - - flake8-noqa==1.1.0 - files: ^(pygleif|examples|tests)/.+\.py$ - repo: https://github.com/PyCQA/isort rev: 5.10.1 hooks: @@ -47,3 +45,11 @@ repos: language: system types: [python] files: tests + - repo: local + hooks: + - id: flake8 + name: flake8 + entry: flake8 + language: system + types: [python] + files: ^(pygleif|examples|tests)/.+\.py$ diff --git a/requirements_test.txt b/requirements_test.txt index 4661aa7..9d51595 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -1,11 +1,11 @@ -pytest==7.1.2 -flake8==4.0.1 -pytest-timeout==2.1.0 -pytest-cov==3.0.0 black==22.3.0 -mypy==0.961 -pre-commit==2.19.0 -flake8-docstrings==1.6.0 +coverage==6.4.1 +flake8==4.0.1 flake8-comprehensions==3.10.0 +flake8-docstrings==1.6.0 flake8-noqa==1.2.5 -coverage==6.4.1 +mypy==0.961 +pre-commit==2.19.0 +pytest==7.1.2 +pytest-cov==3.0.0 +pytest-timeout==2.1.0