Skip to content

Commit 9d51b39

Browse files
committed
fix spacing
1 parent 1f9b513 commit 9d51b39

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

readthedocs/builds/views.py

+16-9
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from __future__ import absolute_import
44
from builtins import object
55
import logging
6+
import textwrap
67

78
from django.shortcuts import get_object_or_404
89
from django.views.generic import ListView, DetailView
@@ -88,20 +89,26 @@ def get_context_data(self, **kwargs):
8889
"?title={title}{build_id}"
8990
"&body={body}")
9091

91-
body = ("# Details:\n\n"
92-
"*Project URL: https://readthedocs.org/projects/{projname}/\n"
93-
"*Build URL(if applicable): https://readthedocs.org{build_path}\n"
94-
"*Read the Docs username(if applicable): {uname}\n\n"
95-
"## Expected Result\n\n"
96-
"*A description of what you wanted to happen*\n\n"
97-
"## Actual Result\n\n"
98-
"*A description of what actually happened*").format(
92+
body = """
93+
# Details:
94+
95+
*Project URL: https://readthedocs.org/projects/{projname}/
96+
*Build URL(if applicable): https://readthedocs.org{build_path}
97+
*Read the Docs username(if applicable): {uname}
98+
99+
## Expected Result
100+
101+
*A description of what you wanted to happen*
102+
103+
## Actual Result
104+
105+
*A description of what actually happened*""".format(
99106
projname=self.project, build_path=self.request.path,
100107
uname=self.request.user)
101108

102109
scheme_dict = {'title': quote("Build error with build id #"),
103110
'build_id': context['build'].id,
104-
'body': quote(body)}
111+
'body': quote(textwrap.dedent(body))}
105112

106113
issue_url = scheme.format(**scheme_dict)
107114
issue_url = urlparse(issue_url).geturl()

0 commit comments

Comments
 (0)