@@ -56,7 +56,6 @@ def map_subproject_slug(view_func):
56
56
57
57
.. warning:: Does not take into account any kind of privacy settings.
58
58
"""
59
-
60
59
@wraps (view_func )
61
60
def inner_view (
62
61
request , subproject = None , subproject_slug = None , * args , ** kwargs ):
@@ -86,7 +85,6 @@ def map_project_slug(view_func):
86
85
87
86
.. warning:: Does not take into account any kind of privacy settings.
88
87
"""
89
-
90
88
@wraps (view_func )
91
89
def inner_view (request , project = None , project_slug = None , * args , ** kwargs ):
92
90
if project is None :
@@ -152,8 +150,7 @@ def _serve_file(request, filename, basepath):
152
150
def serve_docs (
153
151
request , project , subproject , lang_slug = None , version_slug = None ,
154
152
filename = '' ):
155
- """Exists to map existing proj, lang, version, filename views to the file
156
- format."""
153
+ """Exists to map existing proj, lang, version, filename views to the file format."""
157
154
if not version_slug :
158
155
version_slug = project .get_default_version ()
159
156
try :
@@ -198,16 +195,15 @@ def _serve_symlink_docs(request, project, privacy_level, filename=''):
198
195
199
196
serve_docs = getattr (settings , 'SERVE_DOCS' , [constants .PRIVATE ])
200
197
201
- if (settings .DEBUG or constants .PUBLIC in serve_docs ) and privacy_level != constants .PRIVATE : # yapf: disable
198
+ if (settings .DEBUG or constants .PUBLIC in serve_docs ) and privacy_level != constants .PRIVATE : # yapf: disable # noqa
202
199
public_symlink = PublicSymlink (project )
203
200
basepath = public_symlink .project_root
204
201
if os .path .exists (os .path .join (basepath , filename )):
205
202
return _serve_file (request , filename , basepath )
206
203
else :
207
204
files_tried .append (os .path .join (basepath , filename ))
208
205
209
- if (settings .DEBUG or constants .PRIVATE in serve_docs ) and privacy_level == constants .PRIVATE : # yapf: disable
210
-
206
+ if (settings .DEBUG or constants .PRIVATE in serve_docs ) and privacy_level == constants .PRIVATE : # yapf: disable # noqa
211
207
# Handle private
212
208
private_symlink = PrivateSymlink (project )
213
209
basepath = private_symlink .project_root
0 commit comments