Skip to content

Commit 0060f94

Browse files
committed
Move configuration to pyproject.toml where possible
1 parent a758448 commit 0060f94

File tree

5 files changed

+68
-68
lines changed

5 files changed

+68
-68
lines changed

.coveragerc

Lines changed: 0 additions & 26 deletions
This file was deleted.

.mypy.ini

Lines changed: 0 additions & 20 deletions
This file was deleted.

MANIFEST.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@ include README.md
66
include SECURITY.md
77

88
include .bumpversion.cfg
9-
include .coveragerc
109
include .editorconfig
1110
include .flake8
12-
include .mypy.ini
1311
include .readthedocs.yaml
1412

1513
include tox.ini

pyproject.toml

Lines changed: 68 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ description = """
55
GraphQL-core is a Python port of GraphQL.js,\
66
the JavaScript reference implementation for GraphQL."""
77
license = "MIT"
8-
authors = [
9-
"Christoph Zwerschke <[email protected]>"
10-
]
8+
authors = ["Christoph Zwerschke <[email protected]>"]
119
readme = "README.md"
1210
homepage = "https://github.com/graphql-python/graphql-core"
1311
repository = "https://github.com/graphql-python/graphql-core"
@@ -28,10 +26,8 @@ packages = [
2826
{ include = "tests", format = "sdist" },
2927
{ include = "docs", format = "sdist" },
3028
{ include = '.bumpversion.cfg', format = "sdist" },
31-
{ include = '.coveragerc', format = "sdist" },
3229
{ include = '.editorconfig', format = "sdist" },
3330
{ include = '.flake8', format = "sdist" },
34-
{ include = '.mypy.ini', format = "sdist" },
3531
{ include = '.readthedocs.yaml', format = "sdist" },
3632
{ include = 'poetry.lock', format = "sdist" },
3733
{ include = 'tox.ini', format = "sdist" },
@@ -41,10 +37,13 @@ packages = [
4137
{ include = 'SECURITY.md', format = "sdist" }
4238
]
4339

40+
[tool.poetry.urls]
41+
Changelog = "https://github.com/graphql-python/graphql-core/releases"
42+
4443
[tool.poetry.dependencies]
4544
python = "^3.7"
4645
typing-extensions = [
47-
{ version = "^4.3", python = "<3.8" },
46+
{ version = "^4.3", python = "<3.8" }
4847
]
4948

5049
[tool.poetry.dev-dependencies]
@@ -63,9 +62,72 @@ check-manifest = ">=0.48,<1"
6362
bump2version = ">=1.0,<2"
6463
tox = "^3.26"
6564

65+
6666
[tool.black]
6767
target-version = ['py37', 'py38', 'py39', 'py310']
6868

69+
[tool.coverage.run]
70+
branch = true
71+
source = ["src"]
72+
omit = [
73+
"*/conftest.py",
74+
"*/test_*_fuzz.py",
75+
"*/assert_valid_name.py",
76+
"*/cached_property.py",
77+
"*/character_classes.py",
78+
"*/is_iterable.py",
79+
"*/subscription/__init__.py"
80+
]
81+
82+
[tool.coverage.report]
83+
exclude_lines = [
84+
"pragma: no cover",
85+
"except ImportError:",
86+
"# Python <",
87+
"raise NotImplementedError",
88+
'raise TypeError\(f?"Unexpected',
89+
"assert False,",
90+
'\s+next\($',
91+
"if MYPY:",
92+
"if TYPE_CHECKING:",
93+
'^\s+\.\.\.$',
94+
'^\s+pass$'
95+
]
96+
ignore_errors = true
97+
98+
[tool.mypy]
99+
python_version = 3.9
100+
check_untyped_defs = true
101+
no_implicit_optional = true
102+
strict_optional = true
103+
warn_redundant_casts = true
104+
warn_unused_ignores = true
105+
disallow_untyped_defs = true
106+
107+
[[tool.mypy.overrides]]
108+
module = [
109+
"graphql.pyutils.frozen_dict",
110+
"graphql.pyutils.frozen_list",
111+
"graphql.type.introspection",
112+
"tests.*"
113+
]
114+
disallow_untyped_defs = false
115+
116+
[tool.pytest.ini_options]
117+
minversion = "7.1"
118+
# Only run benchmarks as tests.
119+
# To actually run the benchmarks, use --benchmark-enable on the command line.
120+
# To run the slow tests (fuzzing), add --run-slow on the command line.
121+
addopts = "--benchmark-disable"
122+
# Deactivate default name pattern for test classes (we use pytest_describe).
123+
python_classes = "PyTest*"
124+
# Handle all async fixtures and tests automatically by asyncio
125+
asyncio_mode = "auto"
126+
# Set a timeout in seconds for aborting tests that run too long.
127+
timeout = "100"
128+
# Ignore config options not (yet) available in older Python versions.
129+
filterwarnings = "ignore::pytest.PytestConfigWarning"
130+
69131
[build-system]
70132
requires = ["poetry_core>=1,<2", "setuptools>=65,<70"]
71133
build-backend = "poetry.core.masonry.api"

setup.cfg

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,3 @@ python-tag = py3
33

44
[aliases]
55
test = pytest
6-
7-
[tool:pytest]
8-
# Only run benchmarks as tests.
9-
# To actually run the benchmarks, use --benchmark-enable on the command line.
10-
# To run the slow tests (fuzzing), add --run-slow on the command line.
11-
addopts = --benchmark-disable
12-
# Deactivate default name pattern for test classes (we use pytest_describe).
13-
python_classes = PyTest*
14-
# Handle all async fixtures and tests automatically by asyncio
15-
asyncio_mode = auto
16-
# Set a timeout in seconds for aborting tests that run too long.
17-
timeout = 100
18-
# Ignore config options not (yet) available in older Python versions.
19-
filterwarnings = ignore::pytest.PytestConfigWarning

0 commit comments

Comments
 (0)