Skip to content

Commit a3d977b

Browse files
committed
Type ignores
1 parent 8212604 commit a3d977b

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

strawberry/annotation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def _resolve(self) -> Union[StrawberryType, type]:
145145
if self._is_lazy_type(evaled_type):
146146
return evaled_type
147147
if self._is_streamable(evaled_type, args):
148-
return self.create_list(list[evaled_type])
148+
return self.create_list(list[evaled_type]) # type: ignore[valid-type, assignment]
149149
if self._is_list(evaled_type):
150150
return self.create_list(evaled_type)
151151
if self._is_maybe(evaled_type):

strawberry/schema/_graphql_core.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
from strawberry.types import ExecutionResult
88

99
try:
10-
from graphql import (
10+
from graphql import ( # type: ignore[attr-defined]
1111
ExperimentalIncrementalExecutionResults as GraphQLIncrementalExecutionResults,
1212
)
13-
from graphql.execution import experimental_execute_incrementally
14-
from graphql.type.directives import (
13+
from graphql.execution import (
14+
experimental_execute_incrementally, # type: ignore[attr-defined]
15+
)
16+
from graphql.type.directives import ( # type: ignore[attr-defined]
1517
GraphQLDeferDirective,
1618
GraphQLStreamDirective,
1719
)
@@ -22,7 +24,7 @@
2224
)
2325

2426
except ImportError:
25-
GraphQLIncrementalExecutionResults = type(None)
27+
GraphQLIncrementalExecutionResults = type(None) # type: ignore[assignment]
2628

2729
incremental_execution_directives = []
2830
experimental_execute_incrementally = None

strawberry/schema/schema.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,16 +322,16 @@ class Query:
322322
graphql_types.append(graphql_type)
323323

324324
try:
325-
directives = specified_directives + tuple(graphql_directives)
325+
directives = specified_directives + tuple(graphql_directives) # type: ignore
326326

327327
if self.config.enable_experimental_incremental_execution:
328-
directives = tuple(directives) + tuple(incremental_execution_directives)
328+
directives = tuple(directives) + tuple(incremental_execution_directives) # type: ignore
329329

330330
self._schema = GraphQLSchema(
331331
query=query_type,
332332
mutation=mutation_type,
333333
subscription=subscription_type if subscription else None,
334-
directives=directives,
334+
directives=directives, # type: ignore
335335
types=graphql_types,
336336
extensions={
337337
GraphQLCoreConverter.DEFINITION_BACKREF: self,

0 commit comments

Comments
 (0)