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