Fixed PEP8 + Python 3 print

This commit is contained in:
Syrus Akbary 2016-05-11 23:54:15 -07:00
parent 7a27a9ef9f
commit 7be5b83fdf
20 changed files with 22 additions and 25 deletions

View File

@ -1,3 +1,2 @@
from django.test import TestCase
# Create your tests here.

View File

@ -1,3 +1,2 @@
from django.shortcuts import render
# Create your views here.

View File

@ -2,8 +2,8 @@
# Generated by Django 1.9 on 2015-12-04 18:20
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):

View File

@ -1,3 +1,2 @@
from django.test import TestCase
# Create your tests here.

View File

@ -1,3 +1,2 @@
from django.shortcuts import render
# Create your views here.

View File

@ -66,4 +66,5 @@ __all__ = [
'ListField',
'NonNullField',
'FloatField',
'resolve_only_args']
'resolve_only_args',
'with_context']

View File

@ -149,7 +149,6 @@ def test_should_query_connection():
schema = graphene.Schema(query=Query, plugins=[DjangoDebugPlugin()])
result = schema.execute(query)
assert not result.errors
print result.data['__debug']['sql']
assert result.data['allReporters'] == expected['allReporters']
assert 'COUNT' in result.data['__debug']['sql'][0]['rawSql']
query = str(Reporter.objects.all()[:1].query)

View File

@ -4,10 +4,10 @@ from django.db import models
from django.utils.text import capfirst
from django_filters import Filter, MultipleChoiceFilter
from django_filters.filterset import FilterSet, FilterSetMetaclass
from graphql_relay.node.node import from_global_id
from graphene.contrib.django.forms import (GlobalIDFormField,
GlobalIDMultipleChoiceField)
from graphql_relay.node.node import from_global_id
class GlobalIDFilter(Filter):

View File

@ -3,6 +3,7 @@ import binascii
from django.core.exceptions import ValidationError
from django.forms import CharField, Field, IntegerField, MultipleChoiceField
from django.utils.translation import ugettext_lazy as _
from graphql_relay import from_global_id

View File

@ -7,7 +7,7 @@ from graphene import relay
from graphene.contrib.sqlalchemy import (SQLAlchemyConnectionField,
SQLAlchemyNode, SQLAlchemyObjectType)
from .models import Article, Base, Reporter, Editor
from .models import Article, Base, Editor, Reporter
db = create_engine('sqlite:///test_sqlalchemy.sqlite3')

View File

@ -1,9 +1,9 @@
import six
from graphql.type import GraphQLEnumType, GraphQLEnumValue
from .base import ClassTypeMeta, ClassType
from ..types.base import MountedType
from ...utils.enum import Enum as PyEnum
from ..types.base import MountedType
from .base import ClassType, ClassTypeMeta
class EnumMeta(ClassTypeMeta):

View File

@ -1,6 +1,5 @@
from graphql.type import (GraphQLBoolean, GraphQLField, GraphQLFloat,
GraphQLID, GraphQLInt, GraphQLNonNull,
GraphQLString)
GraphQLID, GraphQLInt, GraphQLNonNull, GraphQLString)
from py.test import raises
from graphene.core.fields import (BooleanField, Field, FloatField, IDField,

View File

@ -1,6 +1,6 @@
import json
import iso8601
import iso8601
from graphql.language import ast
from ...core.classtypes.scalar import Scalar

View File

@ -1,5 +1,5 @@
from graphql.type import (GraphQLBoolean, GraphQLFloat, GraphQLID,
GraphQLInt, GraphQLString)
from graphql.type import (GraphQLBoolean, GraphQLFloat, GraphQLID, GraphQLInt,
GraphQLString)
from .base import MountedType

View File

@ -1,5 +1,4 @@
import iso8601
from graphql.language.ast import StringValue
from ..custom_scalars import DateTime

View File

@ -1,5 +1,4 @@
from graphql.type import (GraphQLField, GraphQLInputObjectField,
GraphQLString)
from graphql.type import GraphQLField, GraphQLInputObjectField, GraphQLString
from graphene.core.schema import Schema
from graphene.core.types import InputObjectType, ObjectType

View File

@ -1,5 +1,5 @@
from graphql.type import (GraphQLBoolean, GraphQLFloat, GraphQLID,
GraphQLInt, GraphQLString)
from graphql.type import (GraphQLBoolean, GraphQLFloat, GraphQLID, GraphQLInt,
GraphQLString)
from graphene.core.schema import Schema

View File

@ -1,4 +1,5 @@
import six
from graphql_relay.node.node import from_global_id
from ..core.fields import Field
@ -6,6 +7,7 @@ from ..core.types.definitions import NonNull
from ..core.types.scalars import ID, Int, String
from ..utils import with_context
class ConnectionField(Field):
def __init__(self, type, resolver=None, description='',

View File

@ -4,6 +4,7 @@ from collections import Iterable
from functools import wraps
import six
from graphql_relay.connection.arrayconnection import connection_from_list
from graphql_relay.node.node import to_global_id

View File

@ -1,5 +1,5 @@
# coding: utf-8
from ..str_converters import to_camel_case, to_snake_case, to_const
from ..str_converters import to_camel_case, to_const, to_snake_case
def test_snake_case():