Skip to content

Commit 05f5e05

Browse files
committed
lint fix
1 parent f730556 commit 05f5e05

File tree

5 files changed

+4
-6
lines changed

5 files changed

+4
-6
lines changed

readthedocs/projects/models.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
from django.contrib.auth.models import User
1414
from django.core.urlresolvers import NoReverseMatch, reverse
1515
from django.db import models
16-
from django.utils.lru_cache import lru_cache
1716
from django.utils.encoding import python_2_unicode_compatible
1817
from django.utils.functional import cached_property
1918
from django.utils.translation import ugettext_lazy as _
@@ -31,7 +30,6 @@
3130
ChildRelatedProjectQuerySet, FeatureQuerySet, ProjectQuerySet,
3231
RelatedProjectQuerySet)
3332
from readthedocs.projects.templatetags.projects_tags import sort_version_aware
34-
from readthedocs.projects.utils import find_file
3533
from readthedocs.projects.validators import validate_domain_name, validate_repository_url
3634
from readthedocs.projects.version_handling import (
3735
determine_stable_version, version_windows)

readthedocs/projects/tasks.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -954,6 +954,7 @@ def _manage_imported_files(version, path, commit):
954954
full_path = os.path.join(root, filename)
955955
md5 = hashlib.md5(open(full_path, 'rb').read()).hexdigest()
956956
try:
957+
# pylint: disable=unpacking-non-sequence
957958
obj, __ = model_class.objects.get_or_create(
958959
project=version.project,
959960
version=version,

readthedocs/projects/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ def find_file(basename, pattern, path):
4141
:param path: the directory to search for the file
4242
:returns: path of matching file
4343
"""
44-
4544
for root, _, files in os.walk(path):
4645
for filename in files:
4746
file_basename = os.path.splitext(filename)[0]

readthedocs/search/documents.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,8 @@ def get_queryset(self):
9090
.exclude(name__in=SEARCH_EXCLUDED_FILE))
9191
return queryset
9292

93-
def update(self, thing, **kwargs):
93+
def update(self, thing, refresh=None, action='index', **kwargs):
9494
"""Overwrite in order to index only certain files"""
95-
9695
# Object not exist in the provided queryset should not be indexed
9796
# TODO: remove this overwrite when the issue has been fixed
9897
# See below link for more information
@@ -104,4 +103,4 @@ def update(self, thing, **kwargs):
104103
if not obj.exists():
105104
return None
106105

107-
return super(PageDocument, self).update(thing=thing, **kwargs)
106+
return super(PageDocument, self).update(thing=thing, refresh=None, action='index', **kwargs)

readthedocs/search/faceted_search.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33

44
class RTDFacetedSearch(FacetedSearch):
5+
56
"""Overwrite the initialization in order too meet our needs"""
67

78
# TODO: Remove the overwrite when the elastic/elasticsearch-dsl-py#916

0 commit comments

Comments
 (0)