Skip to content

Commit f3eabf7

Browse files
author
Daniel Gallagher
committed
Add in missing imports
1 parent fef7439 commit f3eabf7

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

graphql/backend/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from abc import ABCMeta, abstractmethod
2-
2+
from ..pyutils.cached_property import cached_property
33
import six
4+
from ..language import ast
45

56
# Necessary for static type checking
67
if False: # flake8: noqa

graphql/language/lexer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ def read_string(source, start):
372372

373373
position += 1
374374
if code == 92: # \
375-
append(body[chunk_start : position - 1])
375+
append(body[chunk_start: position - 1])
376376

377377
code = char_code_at(body, position)
378378
escaped = ESCAPED_CHAR_CODES.get(code) # type: ignore
@@ -392,7 +392,7 @@ def read_string(source, start):
392392
source,
393393
position,
394394
u"Invalid character escape sequence: \\u{}.".format(
395-
body[position + 1 : position + 5]
395+
body[position + 1: position + 5]
396396
),
397397
)
398398

graphql/pyutils/compat.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,4 +240,3 @@ def check_threads():
240240
'(Enable the "enable-threads" flag).'
241241
)
242242
)
243-

graphql/type/definition.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -626,17 +626,17 @@ class GeoPoint(GraphQLInputObjectType):
626626
"""
627627

628628
def __init__(self,
629-
name, # type: str
630-
fields, # type: Union[Callable[[], Dict[str, GraphQLInputObjectField]], Dict[str, GraphQLInputObjectField]]
631-
description=None, # type: Optional[str]
632-
container_type=None, # type: Type[Dict[str, Any]]
633-
):
629+
name, # type: str
630+
fields, # type: Union[Callable[[], Dict[str, GraphQLInputObjectField]], Dict[str, GraphQLInputObjectField]]
631+
description=None, # type: Optional[str]
632+
container_type=None, # type: Type[Dict[str, Any]]
633+
):
634634
# type: (...) -> None
635635
assert name, "Type must be named."
636636
self.name = name
637637
self.description = description
638638
if container_type is None:
639-
container_type = dict # type: ignore
639+
container_type = dict # type: ignore
640640
assert callable(container_type), "container_type must be callable"
641641
self.container_type = container_type
642642
self._fields = fields
@@ -755,7 +755,7 @@ class RowType(GraphQLObjectType):
755755

756756
def __init__(
757757
self,
758-
type, # type: Union[GraphQLList, GraphQLObjectType, GraphQLScalarType, GraphQLInputObjectType, GraphQLInterfaceType]
758+
type, # type: Union[GraphQLList, GraphQLObjectType, GraphQLScalarType, GraphQLInputObjectType, GraphQLInterfaceType]
759759
):
760760
# type: (...) -> None
761761
assert is_type(type) and not isinstance(

graphql/type/tests/test_enum_type.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from collections import OrderedDict
2-
2+
from rx import Observable
33
from graphql import graphql
44
from graphql.type import (
55
GraphQLArgument,

graphql/utils/tests/test_build_ast_schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from graphql import GraphQLInt, parse
22
from graphql.utils.build_ast_schema import build_ast_schema
33
from graphql.utils.schema_printer import print_schema
4-
4+
from pytest import raises
55
from ...type import (
66
GraphQLDeprecatedDirective,
77
GraphQLIncludeDirective,

graphql/validation/rules/overlapping_fields_can_be_merged.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def _find_conflicts_within_selection_set(
207207
# selection set to collect conflicts within fragments spread together.
208208
# This compares each item in the list of fragment names to every other item
209209
# in that same list (except for itself).
210-
for other_fragment_name in fragment_names[i + 1 :]:
210+
for other_fragment_name in fragment_names[i + 1:]:
211211
_collect_conflicts_between_fragments(
212212
context,
213213
conflicts,
@@ -444,7 +444,7 @@ def _collect_conflicts_within(
444444
# (except to itself). If the list only has one item, nothing needs to
445445
# be compared.
446446
for i, field in enumerate(fields):
447-
for other_field in fields[i + 1 :]:
447+
for other_field in fields[i + 1:]:
448448
# within one collection is never mutually exclusive
449449
conflict = _find_conflict(
450450
context,

0 commit comments

Comments
 (0)