Skip to content

Commit 0fd5d6d

Browse files
author
Daniel Gallagher
committed
Run pre-commit on all files
1 parent 415a78a commit 0fd5d6d

39 files changed

+122
-123
lines changed

graphql/backend/base.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
from ..pyutils.cached_property import cached_property
2-
from ..language import ast
3-
41
from abc import ABCMeta, abstractmethod
2+
53
import six
64

5+
from ..language import ast
6+
from ..pyutils.cached_property import cached_property
7+
78

89
class GraphQLBackend(six.with_metaclass(ABCMeta)):
910
@abstractmethod

graphql/backend/cache.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
from hashlib import sha1
2+
23
from six import string_types
3-
from ..type import GraphQLSchema
44

5+
from ..type import GraphQLSchema
56
from .base import GraphQLBackend
67

78
_cached_schemas = {}

graphql/backend/compiled.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from six import string_types
2+
23
from .base import GraphQLDocument
34

45

graphql/backend/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
from functools import partial
2+
23
from six import string_types
34

4-
from ..execution import execute, ExecutionResult
5-
from ..language.base import parse, print_ast
5+
from ..execution import ExecutionResult, execute
66
from ..language import ast
7+
from ..language.base import parse, print_ast
78
from ..validation import validate
8-
99
from .base import GraphQLBackend, GraphQLDocument
1010

1111

graphql/backend/quiver_cloud.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
"You can install it using: pip install requests"
77
)
88

9-
from ..utils.schema_printer import print_schema
9+
from six import urlparse
1010

11+
from ..utils.schema_printer import print_schema
1112
from .base import GraphQLBackend
1213
from .compiled import GraphQLCompiledDocument
1314

14-
from six import urlparse
1515

1616
GRAPHQL_QUERY = """
1717
mutation($schemaDsl: String!, $query: String!) {

graphql/backend/tests/schema.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
from graphql.type import (GraphQLField, GraphQLObjectType,
2-
GraphQLSchema, GraphQLString)
3-
1+
from graphql.type import (GraphQLField, GraphQLObjectType, GraphQLSchema,
2+
GraphQLString)
43

54
Query = GraphQLObjectType('Query', lambda: {
65
'hello': GraphQLField(GraphQLString, resolver=lambda *_: "World"),

graphql/backend/tests/test_base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import pytest
2-
from .. import get_default_backend, set_default_backend, GraphQLCoreBackend
2+
3+
from .. import GraphQLCoreBackend, get_default_backend, set_default_backend
34

45

56
def test_get_default_backend_returns_core_by_default():

graphql/backend/tests/test_cache.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
# -*- coding: utf-8 -*-
33
"""Tests for `graphql.backend.cache` module."""
44

5+
from graphql.execution.executors.sync import SyncExecutor
6+
57
import pytest
68

7-
from ..core import GraphQLCoreBackend
89
from ..cache import GraphQLCachedBackend
9-
from graphql.execution.executors.sync import SyncExecutor
10+
from ..core import GraphQLCoreBackend
1011
from .schema import schema
1112

1213

graphql/backend/tests/test_core.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
# -*- coding: utf-8 -*-
33
"""Tests for `graphql.backend.core` module."""
44

5-
import pytest
65
from graphql.execution.executors.sync import SyncExecutor
76

7+
import pytest
8+
89
from ..base import GraphQLBackend, GraphQLDocument
910
from ..core import GraphQLCoreBackend
1011
from .schema import schema

graphql/backend/tests/test_decider.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
import pytest
66

77
from ..base import GraphQLBackend, GraphQLDocument
8-
from ..core import GraphQLCoreBackend
98
from ..cache import GraphQLCachedBackend
9+
from ..core import GraphQLCoreBackend
1010
from ..decider import GraphQLDeciderBackend
11-
1211
from .schema import schema
1312

1413

0 commit comments

Comments
 (0)