Skip to content

Commit b614df0

Browse files
committed
Trying to get lint fixed
1 parent 1f152ef commit b614df0

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

readthedocs/api/base.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,11 @@ def post_list(self, request, **kwargs):
7979
return HttpCreated(location=self.get_resource_uri(updated_bundle))
8080

8181
def sync_versions(self, request, **kwargs):
82-
"""
83-
Sync the version data in the repo (on the build server) with what we
84-
have in the database.
82+
"""Sync the version data in the repo (on the build server) with what we have in the database.
8583
8684
Returns the identifiers for the versions that have been deleted.
8785
"""
86+
8887
project = get_object_or_404(Project, pk=kwargs['pk'])
8988
try:
9089
post_data = self.deserialize(

readthedocs/core/views/serve.py

+3-7
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ def map_subproject_slug(view_func):
5656
5757
.. warning:: Does not take into account any kind of privacy settings.
5858
"""
59-
6059
@wraps(view_func)
6160
def inner_view(
6261
request, subproject=None, subproject_slug=None, *args, **kwargs):
@@ -86,7 +85,6 @@ def map_project_slug(view_func):
8685
8786
.. warning:: Does not take into account any kind of privacy settings.
8887
"""
89-
9088
@wraps(view_func)
9189
def inner_view(request, project=None, project_slug=None, *args, **kwargs):
9290
if project is None:
@@ -152,8 +150,7 @@ def _serve_file(request, filename, basepath):
152150
def serve_docs(
153151
request, project, subproject, lang_slug=None, version_slug=None,
154152
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."""
157154
if not version_slug:
158155
version_slug = project.get_default_version()
159156
try:
@@ -198,16 +195,15 @@ def _serve_symlink_docs(request, project, privacy_level, filename=''):
198195

199196
serve_docs = getattr(settings, 'SERVE_DOCS', [constants.PRIVATE])
200197

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
202199
public_symlink = PublicSymlink(project)
203200
basepath = public_symlink.project_root
204201
if os.path.exists(os.path.join(basepath, filename)):
205202
return _serve_file(request, filename, basepath)
206203
else:
207204
files_tried.append(os.path.join(basepath, filename))
208205

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
211207
# Handle private
212208
private_symlink = PrivateSymlink(project)
213209
basepath = private_symlink.project_root

0 commit comments

Comments
 (0)