Fix formatting in endpoints/api/error.py

This commit is contained in:
Evan Cordell 2016-04-12 16:53:50 -04:00
parent 1cdbd89120
commit d67c4ba46c

View file

@ -1,6 +1,5 @@
""" Error details API """ """ Error details API """
from flask import url_for from flask import url_for
from enum import Enum
from endpoints.api import (resource, nickname, ApiResource, path_param, from endpoints.api import (resource, nickname, ApiResource, path_param,
define_json_response) define_json_response)
@ -34,12 +33,18 @@ class Error(ApiResource):
}, },
'title': { 'title': {
'type': 'string', 'type': 'string',
'description': 'The title of the error. Can be used to uniquely identify the kind of error.', 'description': (
'The title of the error. Can be used to uniquely identify the kind'
' of error.'
),
'enum': list(ApiErrorType.__members__) 'enum': list(ApiErrorType.__members__)
}, },
'description': { 'description': {
'type': 'string', 'type': 'string',
'description': 'A more detailed description of the error that may include help for fixing the issue.' 'description': (
'A more detailed description of the error that may include help for'
' fixing the issue.'
)
} }
}, },
}, },
@ -51,5 +56,6 @@ class Error(ApiResource):
""" Get a detailed description of the error """ """ Get a detailed description of the error """
if error_type in ERROR_DESCRIPTION.keys(): if error_type in ERROR_DESCRIPTION.keys():
return error_view(error_type) return error_view(error_type)
raise NotFound() raise NotFound()