Skip to content

Commit 0cce083

Browse files
committed
Call black via pre-commit
1 parent e980ced commit 0cce083

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
default_language_version:
22
python: python3.10
3+
34
repos:
45
- repo: https://github.com/PyCQA/flake8
56
rev: 5.0.4
67
hooks:
78
- id: flake8
89
additional_dependencies: [flake8-bugbear==22.7.1]
10+
11+
- repo: https://github.com/psf/black
12+
rev: 22.6.0
13+
hooks:
14+
- id: black

Makefile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,7 @@ test: tests # Alias test -> tests
1414

1515
.PHONY: format
1616
format:
17-
black --exclude "/migrations/" graphene_django examples setup.py
18-
19-
.PHONY: lint
20-
lint:
21-
flake8 graphene_django examples
17+
pre-commit run --all-files
2218

2319
.PHONY: docs ## Generate docs
2420
docs: dev-setup

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727

2828
dev_requires = [
29-
"black==19.10b0",
29+
"black==22.6.0",
3030
"flake8>=5,<6",
3131
"flake8-black==0.3.3",
3232
"flake8-bugbear==22.7.1",

tox.ini

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,9 @@ deps =
3939
djangomaster: https://github.com/django/django/archive/master.zip
4040
commands = {posargs:py.test --cov=graphene_django graphene_django examples}
4141

42-
[testenv:black]
43-
basepython = python3.10
44-
deps = -e.[dev]
45-
commands =
46-
black --exclude "/migrations/" graphene_django examples setup.py --check
47-
4842
[testenv:pre-commit]
4943
basepython = python3.10
44+
deps = -e.[dev]
5045
skip_install = true
5146
deps = pre-commit
5247
commands =

0 commit comments

Comments
 (0)