mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-11 08:42:32 +03:00
Call black via pre-commit
This commit is contained in:
parent
e980cede38
commit
858ffd4fbb
|
@ -1,8 +1,14 @@
|
|||
default_language_version:
|
||||
python: python3.10
|
||||
|
||||
repos:
|
||||
- repo: https://github.com/PyCQA/flake8
|
||||
rev: 5.0.4
|
||||
hooks:
|
||||
- id: flake8
|
||||
additional_dependencies: [flake8-bugbear==22.7.1]
|
||||
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 22.6.0
|
||||
hooks:
|
||||
- id: black
|
||||
|
|
6
Makefile
6
Makefile
|
@ -14,11 +14,7 @@ test: tests # Alias test -> tests
|
|||
|
||||
.PHONY: format
|
||||
format:
|
||||
black --exclude "/migrations/" graphene_django examples setup.py
|
||||
|
||||
.PHONY: lint
|
||||
lint:
|
||||
flake8 graphene_django examples
|
||||
pre-commit run --all-files
|
||||
|
||||
.PHONY: docs ## Generate docs
|
||||
docs: dev-setup
|
||||
|
|
2
setup.py
2
setup.py
|
@ -26,7 +26,7 @@ tests_require = [
|
|||
|
||||
|
||||
dev_requires = [
|
||||
"black==19.10b0",
|
||||
"black==22.6.0",
|
||||
"flake8>=5,<6",
|
||||
"flake8-black==0.3.3",
|
||||
"flake8-bugbear==22.7.1",
|
||||
|
|
6
tox.ini
6
tox.ini
|
@ -39,12 +39,6 @@ deps =
|
|||
djangomaster: https://github.com/django/django/archive/master.zip
|
||||
commands = {posargs:py.test --cov=graphene_django graphene_django examples}
|
||||
|
||||
[testenv:black]
|
||||
basepython = python3.10
|
||||
deps = -e.[dev]
|
||||
commands =
|
||||
black --exclude "/migrations/" graphene_django examples setup.py --check
|
||||
|
||||
[testenv:pre-commit]
|
||||
basepython = python3.10
|
||||
skip_install = true
|
||||
|
|
Loading…
Reference in New Issue
Block a user