mirror of
				https://github.com/graphql-python/graphene.git
				synced 2025-11-04 18:07:48 +03:00 
			
		
		
		
	Fixed PEP8-Python3 errors
This commit is contained in:
		
							parent
							
								
									577b76e436
								
							
						
					
					
						commit
						b9723356fe
					
				| 
						 | 
				
			
			@ -1,8 +1,6 @@
 | 
			
		|||
from promise import Promise
 | 
			
		||||
from django.db import connections
 | 
			
		||||
 | 
			
		||||
from ....core.schema import GraphQLSchema
 | 
			
		||||
from ....core.types import Field
 | 
			
		||||
from .sql.tracking import unwrap_cursor, wrap_cursor
 | 
			
		||||
from .types import DjangoDebug
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -47,8 +45,10 @@ class DjangoDebugMiddleware(object):
 | 
			
		|||
                raise Exception('DjangoDebug cannot be executed in None contexts')
 | 
			
		||||
            try:
 | 
			
		||||
                context.django_debug = DjangoDebugContext()
 | 
			
		||||
            except Exception, e:
 | 
			
		||||
                raise Exception('DjangoDebug need the context to be writable, context received: {}.'.format(context.__class__.__name__))
 | 
			
		||||
            except Exception:
 | 
			
		||||
                raise Exception('DjangoDebug need the context to be writable, context received: {}.'.format(
 | 
			
		||||
                    context.__class__.__name__
 | 
			
		||||
                ))
 | 
			
		||||
        if info.schema.graphene_schema.T(DjangoDebug) == info.return_type:
 | 
			
		||||
            return context.django_debug.get_debug_promise()
 | 
			
		||||
        promise = next(root, args, context, info)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,6 +10,7 @@ from django.utils.encoding import force_text
 | 
			
		|||
 | 
			
		||||
from .types import DjangoDebugSQL, DjangoDebugPostgreSQL
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class SQLQueryTriggered(Exception):
 | 
			
		||||
    """Thrown when template panel triggers a query"""
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
from collections import OrderedDict
 | 
			
		||||
from functools import wraps, partial
 | 
			
		||||
from functools import wraps
 | 
			
		||||
 | 
			
		||||
import six
 | 
			
		||||
from graphql.type import GraphQLField, GraphQLInputObjectField
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user