Skip to content

Commit 8efb8b3

Browse files
committed
Update dependencies and reformat
1 parent 8f4d245 commit 8efb8b3

19 files changed

+267
-195
lines changed

docs/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,10 @@
152152
ExperimentalIncrementalExecutionResults
153153
FormattedSourceLocation
154154
GraphQLAbstractType
155+
GraphQLCompositeType
155156
GraphQLErrorExtensions
156157
GraphQLFieldResolver
158+
GraphQLInputType
157159
GraphQLTypeResolver
158160
GraphQLOutputType
159161
Middleware

poetry.lock

Lines changed: 179 additions & 94 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ packages = [
3535
{ include = "CODEOWNERS", format = "sdist" },
3636
{ include = "SECURITY.md", format = "sdist" }
3737
]
38+
exclude = ["docs/_build/**"]
3839

3940
[tool.poetry.urls]
4041
Changelog = "https://github.com/graphql-python/graphql-core/releases"
@@ -51,29 +52,32 @@ optional = true
5152

5253
[tool.poetry.group.test.dependencies]
5354
pytest = [
54-
{ version = "^8.0", python = ">=3.8" },
55+
{ version = "^8.1", python = ">=3.8" },
5556
{ version = "^7.4", python = "<3.8"}
5657
]
5758
pytest-asyncio = [
58-
{ version = "^0.23.5", python = ">=3.8" },
59+
{ version = "^0.23.6", python = ">=3.8" },
5960
{ version = "~0.21.1", python = "<3.8"}
6061
]
6162
pytest-benchmark = "^4.0"
62-
pytest-cov = "^4.1"
63+
pytest-cov = [
64+
{ version = "^5.0", python = ">=3.8" },
65+
{ version = "^4.1", python = "<3.8" },
66+
]
6367
pytest-describe = "^2.2"
64-
pytest-timeout = "^2.2"
68+
pytest-timeout = "^2.3"
6569
tox = [
66-
{ version = "^4.13", python = ">=3.8" },
70+
{ version = "^4.14", python = ">=3.8" },
6771
{ version = "^3.28", python = "<3.8" }
6872
]
6973

7074
[tool.poetry.group.lint]
7175
optional = true
7276

7377
[tool.poetry.group.lint.dependencies]
74-
ruff = ">=0.2.1,<0.3"
78+
ruff = ">=0.3.5,<0.4"
7579
mypy = [
76-
{ version = "^1.8", python = ">=3.8" },
80+
{ version = "^1.9", python = ">=3.8" },
7781
{ version = "~1.4", python = "<3.8" }
7882
]
7983
bump2version = ">=1.0,<2"
@@ -253,7 +257,8 @@ exclude_lines = [
253257
"if MYPY:",
254258
"if TYPE_CHECKING:",
255259
'^\s+\.\.\.$',
256-
'^\s+pass$'
260+
'^\s+pass$',
261+
': \.\.\.$'
257262
]
258263
ignore_errors = true
259264

src/graphql/execution/execute.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
# noinspection PyCompatibility
3737
from asyncio.exceptions import TimeoutError
3838
except ImportError: # Python < 3.7
39-
from concurrent.futures import TimeoutError # type: ignore
39+
from concurrent.futures import TimeoutError
4040

4141
from ..error import GraphQLError, GraphQLFormattedError, located_error
4242
from ..language import (

src/graphql/language/lexer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def print_code_point_at(self, location: int) -> str:
7575
return TokenKind.EOF.value
7676
char = body[location]
7777
# Printable ASCII
78-
if "\x20" <= char <= "\x7E":
78+
if "\x20" <= char <= "\x7e":
7979
return "'\"'" if char == '"' else f"'{char}'"
8080
# Unicode code point
8181
point = ord(

src/graphql/pyutils/simple_pub_sub.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ def emit(self, event: Any) -> bool:
3131
create_task(result) # type: ignore # noqa: RUF006
3232
return bool(self.subscribers)
3333

34-
def get_subscriber(
35-
self, transform: Callable | None = None
36-
) -> SimplePubSubIterator:
34+
def get_subscriber(self, transform: Callable | None = None) -> SimplePubSubIterator:
3735
"""Return subscriber iterator"""
3836
return SimplePubSubIterator(self, transform)
3937

src/graphql/type/definition.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1638,18 +1638,15 @@ def assert_nullable_type(type_: Any) -> GraphQLNullableType:
16381638

16391639

16401640
@overload
1641-
def get_nullable_type(type_: None) -> None:
1642-
...
1641+
def get_nullable_type(type_: None) -> None: ...
16431642

16441643

16451644
@overload
1646-
def get_nullable_type(type_: GraphQLNullableType) -> GraphQLNullableType:
1647-
...
1645+
def get_nullable_type(type_: GraphQLNullableType) -> GraphQLNullableType: ...
16481646

16491647

16501648
@overload
1651-
def get_nullable_type(type_: GraphQLNonNull) -> GraphQLNullableType:
1652-
...
1649+
def get_nullable_type(type_: GraphQLNonNull) -> GraphQLNullableType: ...
16531650

16541651

16551652
def get_nullable_type(
@@ -1690,13 +1687,11 @@ def assert_named_type(type_: Any) -> GraphQLNamedType:
16901687

16911688

16921689
@overload
1693-
def get_named_type(type_: None) -> None:
1694-
...
1690+
def get_named_type(type_: None) -> None: ...
16951691

16961692

16971693
@overload
1698-
def get_named_type(type_: GraphQLType) -> GraphQLNamedType:
1699-
...
1694+
def get_named_type(type_: GraphQLType) -> GraphQLNamedType: ...
17001695

17011696

17021697
def get_named_type(type_: GraphQLType | None) -> GraphQLNamedType | None:

src/graphql/type/schema.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,9 @@ def __init__(
238238
if iface.name in implementations_map:
239239
implementations = implementations_map[iface.name]
240240
else:
241-
implementations = implementations_map[
242-
iface.name
243-
] = InterfaceImplementations(objects=[], interfaces=[])
241+
implementations = implementations_map[iface.name] = (
242+
InterfaceImplementations(objects=[], interfaces=[])
243+
)
244244

245245
implementations.interfaces.append(named_type)
246246
elif is_object_type(named_type):
@@ -250,9 +250,9 @@ def __init__(
250250
if iface.name in implementations_map:
251251
implementations = implementations_map[iface.name]
252252
else:
253-
implementations = implementations_map[
254-
iface.name
255-
] = InterfaceImplementations(objects=[], interfaces=[])
253+
implementations = implementations_map[iface.name] = (
254+
InterfaceImplementations(objects=[], interfaces=[])
255+
)
256256

257257
implementations.objects.append(named_type)
258258

src/graphql/type/validate.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,7 @@ def validate_types(self) -> None:
235235
# Ensure Input Objects do not contain non-nullable circular references
236236
validate_input_object_circular_refs(type_)
237237

238-
def validate_fields(
239-
self, type_: GraphQLObjectType | GraphQLInterfaceType
240-
) -> None:
238+
def validate_fields(self, type_: GraphQLObjectType | GraphQLInterfaceType) -> None:
241239
fields = type_.fields
242240

243241
# Objects and Interfaces both must define one or more fields.

src/graphql/utilities/ast_to_dict.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,23 @@
1313
@overload
1414
def ast_to_dict(
1515
node: Node, locations: bool = False, cache: dict[Node, Any] | None = None
16-
) -> dict:
17-
...
16+
) -> dict: ...
1817

1918

2019
@overload
2120
def ast_to_dict(
2221
node: Collection[Node],
2322
locations: bool = False,
2423
cache: dict[Node, Any] | None = None,
25-
) -> list[Node]:
26-
...
24+
) -> list[Node]: ...
2725

2826

2927
@overload
3028
def ast_to_dict(
3129
node: OperationType,
3230
locations: bool = False,
3331
cache: dict[Node, Any] | None = None,
34-
) -> str:
35-
...
32+
) -> str: ...
3633

3734

3835
def ast_to_dict(

0 commit comments

Comments
 (0)