Skip to content

Commit 077ea2b

Browse files
author
Daniel Gallagher
committed
Minimize unnecesary diff
1 parent f3eabf7 commit 077ea2b

File tree

16 files changed

+33
-124
lines changed

16 files changed

+33
-124
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ matrix:
1212
python: pypy-5.7.1
1313
- env: TOXENV=pre-commit
1414
python: 3.6
15+
- env: TOXENV=mypy
16+
python: 3.6
1517
install: pip install coveralls tox
1618
script: tox
1719
after_success: coveralls

graphql/backend/base.py

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

4+
from abc import ABCMeta, abstractmethod
5+
import six
6+
7+
68
# Necessary for static type checking
79
if False: # flake8: noqa
810
from typing import Dict, Optional, Union, Callable

graphql/backend/cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from hashlib import sha1
22

33
from six import string_types
4-
54
from ..type import GraphQLSchema
5+
66
from .base import GraphQLBackend
77

88
# Necessary for static type checking

graphql/backend/compiled.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from six import string_types
2-
32
from .base import GraphQLDocument
43

54
# Necessary for static type checking

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-
32
from six import string_types
43

5-
from ..execution import ExecutionResult, execute
6-
from ..language import ast
4+
from ..execution import execute, ExecutionResult
75
from ..language.base import parse, print_ast
6+
from ..language import ast
87
from ..validation import validate
8+
99
from .base import GraphQLBackend, GraphQLDocument
1010

1111
# Necessary for static type checking

graphql/backend/quiver_cloud.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
)
88

99
from ..utils.schema_printer import print_schema
10+
1011
from .base import GraphQLBackend
1112
from .compiled import GraphQLCompiledDocument
1213

1314
from six.moves.urllib.parse import urlparse
1415

15-
1616
GRAPHQL_QUERY = """
1717
mutation($schemaDsl: String!, $query: String!, $pythonOptions: PythonOptions) {
1818
generateCode(

graphql/backend/tests/test_base.py

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

54

65
def test_get_default_backend_returns_core_by_default():

graphql/backend/tests/test_cache.py

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

5-
from graphql.execution.executors.sync import SyncExecutor
6-
75
import pytest
86

9-
from ..cache import GraphQLCachedBackend
107
from ..core import GraphQLCoreBackend
8+
from ..cache import GraphQLCachedBackend
9+
from graphql.execution.executors.sync import SyncExecutor
1110
from .schema import schema
1211

1312

graphql/backend/tests/test_core.py

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

5-
from graphql.execution.executors.sync import SyncExecutor
6-
75
import pytest
6+
from graphql.execution.executors.sync import SyncExecutor
87

98
from ..base import GraphQLBackend, GraphQLDocument
109
from ..core import GraphQLCoreBackend

graphql/backend/tests/test_decider.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
from threading import Event
77

88
from ..base import GraphQLBackend, GraphQLDocument
9-
from ..cache import GraphQLCachedBackend
109
from ..core import GraphQLCoreBackend
10+
from ..cache import GraphQLCachedBackend
1111
from ..decider import GraphQLDeciderBackend
12+
1213
from .schema import schema
1314

1415
if False:

0 commit comments

Comments
 (0)