From d67c4ba46c0451ef5ab0dbfa94d030174fc51bac Mon Sep 17 00:00:00 2001 From: Evan Cordell Date: Tue, 12 Apr 2016 16:53:50 -0400 Subject: [PATCH] Fix formatting in `endpoints/api/error.py` --- endpoints/api/error.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/endpoints/api/error.py b/endpoints/api/error.py index c6b3a5b0a..23d95ed32 100644 --- a/endpoints/api/error.py +++ b/endpoints/api/error.py @@ -1,6 +1,5 @@ """ Error details API """ from flask import url_for -from enum import Enum from endpoints.api import (resource, nickname, ApiResource, path_param, define_json_response) @@ -33,13 +32,19 @@ class Error(ApiResource): 'description': 'A reference to the error type resource' }, 'title': { - 'type': 'string', - 'description': 'The title of the error. Can be used to uniquely identify the kind of error.', - 'enum': list(ApiErrorType.__members__) + 'type': 'string', + 'description': ( + 'The title of the error. Can be used to uniquely identify the kind' + ' of error.' + ), + 'enum': list(ApiErrorType.__members__) }, 'description': { - 'type': 'string', - 'description': 'A more detailed description of the error that may include help for fixing the issue.' + 'type': 'string', + 'description': ( + 'A more detailed description of the error that may include help for' + ' fixing the issue.' + ) } }, }, @@ -50,6 +55,7 @@ class Error(ApiResource): def get(self, error_type): """ Get a detailed description of the error """ if error_type in ERROR_DESCRIPTION.keys(): - return error_view(error_type) + return error_view(error_type) + raise NotFound()