mirror of
				https://github.com/graphql-python/graphene.git
				synced 2025-10-31 16:07:27 +03:00 
			
		
		
		
	Fixed lint in graphene.test
This commit is contained in:
		
							parent
							
								
									6c2b940a03
								
							
						
					
					
						commit
						c41b183fad
					
				|  | @ -18,7 +18,9 @@ def format_execution_result(execution_result, format_error): | ||||||
|         response = {} |         response = {} | ||||||
| 
 | 
 | ||||||
|         if execution_result.errors: |         if execution_result.errors: | ||||||
|             response['errors'] = [format_error(e) for e in execution_result.errors] |             response['errors'] = [ | ||||||
|  |                 format_error(e) for e in execution_result.errors | ||||||
|  |             ] | ||||||
| 
 | 
 | ||||||
|         if not execution_result.invalid: |         if not execution_result.invalid: | ||||||
|             response['data'] = execution_result.data |             response['data'] = execution_result.data | ||||||
|  | @ -34,13 +36,11 @@ class Client(object): | ||||||
|         self.format_error = format_error or default_format_error |         self.format_error = format_error or default_format_error | ||||||
| 
 | 
 | ||||||
|     def format_result(self, result): |     def format_result(self, result): | ||||||
|         return format_execution_result( |         return format_execution_result(result, self.format_error) | ||||||
|             result, |  | ||||||
|             self.format_error |  | ||||||
|         ) |  | ||||||
| 
 | 
 | ||||||
|     def execute(self, *args, **kwargs): |     def execute(self, *args, **kwargs): | ||||||
|         executed = self.schema.execute(*args, **dict(self.execute_options, **kwargs)) |         executed = self.schema.execute(*args, | ||||||
|  |                                        **dict(self.execute_options, **kwargs)) | ||||||
|         if is_thenable(executed): |         if is_thenable(executed): | ||||||
|             return Promise.resolve(executed).then(self.format_result) |             return Promise.resolve(executed).then(self.format_result) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user