bump and correct pre-commit config

This commit is contained in:
Wong Chun Hong 2023-08-30 00:18:56 +01:00
parent 52bb458289
commit e45a100a69
2 changed files with 13 additions and 10 deletions

View File

@ -1,6 +1,9 @@
default_language_version:
python: python3.11
repos: repos:
- repo: git://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.1.0 rev: v4.4.0
hooks: hooks:
- id: check-merge-conflict - id: check-merge-conflict
- id: check-json - id: check-json
@ -14,15 +17,14 @@ repos:
- id: trailing-whitespace - id: trailing-whitespace
exclude: README.md exclude: README.md
- repo: https://github.com/asottile/pyupgrade - repo: https://github.com/asottile/pyupgrade
rev: v1.12.0 rev: v3.10.1
hooks: hooks:
- id: pyupgrade - id: pyupgrade
- repo: https://github.com/ambv/black - repo: https://github.com/psf/black
rev: 21.6b0 rev: 23.7.0
hooks: hooks:
- id: black - id: black
language_version: python3
- repo: https://github.com/PyCQA/flake8 - repo: https://github.com/PyCQA/flake8
rev: 3.9.2 rev: 6.1.0
hooks: hooks:
- id: flake8 - id: flake8

View File

@ -22,12 +22,13 @@ commands =
py3{8,9,10,11,12-dev}: py.test --cov=graphene graphene examples tests_asyncio tests_py36 {posargs} py3{8,9,10,11,12-dev}: py.test --cov=graphene graphene examples tests_asyncio tests_py36 {posargs}
[testenv:pre-commit] [testenv:pre-commit]
basepython = python3.11
deps = deps =
pre-commit>0.12.0 pre-commit>=3,<4
setenv = setenv =
LC_CTYPE=en_US.UTF-8 LC_CTYPE=en_US.UTF-8
commands = commands =
pre-commit {posargs:run --all-files} pre-commit run --all-files --show-diff-on-failure
[testenv:mypy] [testenv:mypy]
deps = deps =