move code linting to a stricter pep8-esque auto-formatting tool, black

This commit is contained in:
Ryan Petrello
2021-03-19 12:44:51 -04:00
parent 9b702e46fe
commit c2ef0a6500
671 changed files with 20538 additions and 21924 deletions

View File

@@ -47,9 +47,11 @@ def handle_error(request, status=404, **kwargs):
# browsable error page for browser clients or a simple JSON response for any
# other clients.
if request.path.startswith('/api/'):
class APIException(exceptions.APIException):
status_code = status
default_detail = kwargs['content']
api_error_view = ApiErrorView.as_view(exception_class=APIException)
response = api_error_view(request)
if hasattr(response, 'render'):