Skip to content

Commit 08d351d

Browse files
author
Rami Chowdhury
committed
Update test configs and setup formatting
1 parent fc84f92 commit 08d351d

File tree

3 files changed

+21
-31
lines changed

3 files changed

+21
-31
lines changed

.pre-commit-config.yaml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,22 @@ default_language_version:
33
fail_fast: true
44
repos:
55
- repo: git://github.com/pre-commit/pre-commit-hooks
6-
rev: c8bad492e1b1d65d9126dba3fe3bd49a5a52b9d6 # v2.1.0
6+
rev: v2.1.0
77
hooks:
8-
- id: check-merge-conflict
9-
- id: check-yaml
10-
- id: debug-statements
11-
- id: end-of-file-fixer
12-
exclude: ^docs/.*$
13-
- id: trailing-whitespace
14-
exclude: README.md
8+
- id: check-merge-conflict
9+
- id: check-yaml
10+
- id: debug-statements
11+
- id: end-of-file-fixer
12+
exclude: ^docs/.*$
13+
- id: trailing-whitespace
14+
exclude: README.md
15+
- id: flake8
1516
- repo: https://github.com/pre-commit/mirrors-mypy
1617
rev: v0.701
1718
hooks:
1819
- id: mypy
19-
language_version: python3.7
2020
args: [--ignore-missing-imports, --no-strict-optional]
21-
- repo: https://github.com/pre-commit/pre-commit-hooks
22-
rev: v2.0.0
23-
hooks:
24-
- id: flake8
25-
language_version: python3.7
2621
- repo: https://github.com/python/black
2722
rev: stable
2823
hooks:
2924
- id: black
30-
language_version: python3.7

setup.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@
77
"pydantic>=0.25,<0.30",
88
]
99

10-
tests_require = [
11-
"pytest==4.6.3",
12-
"pytest-cov==2.7.1",
10+
dev_requirements = [
11+
"tox==3.7.0", # Should be kept in sync with tox.ini
12+
"mypy==0.701",
13+
"black==19.3b0",
14+
"pre-commit==1.14.4",
1315
]
16+
test_requirements = ["pytest==4.6.3", "pytest-cov==2.7.1"]
1417

1518
setup(
1619
name="graphene-pydantic",
@@ -32,12 +35,6 @@
3235
keywords="api graphql protocol rest relay graphene pydantic model",
3336
packages=find_packages(exclude=["tests"]),
3437
install_requires=requirements,
35-
extras_require={
36-
"dev": [
37-
"tox==3.7.0", # Should be kept in sync with tox.ini
38-
"pre-commit==1.14.4",
39-
],
40-
"test": tests_require,
41-
},
42-
tests_require=tests_require,
38+
extras_require={"dev": dev_requirements, "test": test_requirements},
39+
tests_require=test_requirements,
4340
)

tox.ini

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
[tox]
22
envlist = pre-commit,py{36,37}
3-
skipsdist = true
3+
skipsdist = {env:TOXBUILD:false}
44

55
[testenv]
66
deps =
7+
.[dev]
78
.[test]
8-
mypy
9-
black
109
commands =
1110
pytest tests/ --cov-report=term-missing --cov=graphene_pydantic {posargs}
1211
mypy --ignore-missing-imports --no-strict-optional -m graphene_pydantic
1312
black --check graphene_pydantic
1413

1514
[testenv:pre-commit]
16-
basepython=python3.7
15+
basepython = python3.7
1716
deps =
1817
.[dev]
1918
commands =
20-
pre-commit {posargs:run --all-files}
19+
pre-commit {posargs:run --all-files}

0 commit comments

Comments
 (0)