Skip to content

Commit

Permalink
Trying to get lint fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
humitos committed Dec 12, 2017
1 parent eef9f65 commit cd29ebd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
5 changes: 2 additions & 3 deletions readthedocs/api/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,11 @@ def post_list(self, request, **kwargs):
return HttpCreated(location=self.get_resource_uri(updated_bundle))

def sync_versions(self, request, **kwargs):
"""
Sync the version data in the repo (on the build server) with what we
have in the database.
"""Sync the version data in the repo (on the build server) with what we have in the database.
Returns the identifiers for the versions that have been deleted.
"""

project = get_object_or_404(Project, pk=kwargs['pk'])
try:
post_data = self.deserialize(
Expand Down
10 changes: 3 additions & 7 deletions readthedocs/core/views/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ def map_subproject_slug(view_func):
.. warning:: Does not take into account any kind of privacy settings.
"""

@wraps(view_func)
def inner_view(
request, subproject=None, subproject_slug=None, *args, **kwargs):
Expand Down Expand Up @@ -86,7 +85,6 @@ def map_project_slug(view_func):
.. warning:: Does not take into account any kind of privacy settings.
"""

@wraps(view_func)
def inner_view(request, project=None, project_slug=None, *args, **kwargs):
if project is None:
Expand Down Expand Up @@ -152,8 +150,7 @@ def _serve_file(request, filename, basepath):
def serve_docs(
request, project, subproject, lang_slug=None, version_slug=None,
filename=''):
"""Exists to map existing proj, lang, version, filename views to the file
format."""
"""Exists to map existing proj, lang, version, filename views to the file format."""
if not version_slug:
version_slug = project.get_default_version()
try:
Expand Down Expand Up @@ -198,16 +195,15 @@ def _serve_symlink_docs(request, project, privacy_level, filename=''):

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

if (settings.DEBUG or constants.PUBLIC in serve_docs) and privacy_level != constants.PRIVATE: # yapf: disable
if (settings.DEBUG or constants.PUBLIC in serve_docs) and privacy_level != constants.PRIVATE: # yapf: disable # noqa
public_symlink = PublicSymlink(project)
basepath = public_symlink.project_root
if os.path.exists(os.path.join(basepath, filename)):
return _serve_file(request, filename, basepath)
else:
files_tried.append(os.path.join(basepath, filename))

if (settings.DEBUG or constants.PRIVATE in serve_docs) and privacy_level == constants.PRIVATE: # yapf: disable

if (settings.DEBUG or constants.PRIVATE in serve_docs) and privacy_level == constants.PRIVATE: # yapf: disable # noqa
# Handle private
private_symlink = PrivateSymlink(project)
basepath = private_symlink.project_root
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/restapi/views/footer_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def get_version_compare_data(project, base_version=None):
}
if highest_version_obj:
ret_val['url'] = highest_version_obj.get_absolute_url()
ret_val['slug'] = highest_version_obj.slug,
ret_val['slug'] = (highest_version_obj.slug,)
if base_version and base_version.slug != LATEST:
try:
base_version_comparable = parse_version_failsafe(
Expand Down

0 comments on commit cd29ebd

Please sign in to comment.