Skip to content

Commit 8645edc

Browse files
committed
fixing lint
1 parent c2f604d commit 8645edc

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def get_queryset(self):
9090
.exclude(name__in=SEARCH_EXCLUDED_FILE))
9191
return queryset
9292

93-
def update(self, thing, *args, **kwargs):
93+
def update(self, thing, refresh=None, action='index', **kwargs):
9494
"""Overwrite in order to index only certain files"""
9595
# Object not exist in the provided queryset should not be indexed
9696
# TODO: remove this overwrite when the issue has been fixed
@@ -103,4 +103,4 @@ def update(self, thing, *args, **kwargs):
103103
if not obj.exists():
104104
return None
105105

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

readthedocs/search/faceted_search.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22

33

44
class RTDFacetedSearch(FacetedSearch):
5-
"""
6-
Overwrite the initialization in order too meet our needs
7-
"""
5+
6+
"""Overwrite the initialization in order too meet our needs"""
87

98
# TODO: Remove the overwrite when the elastic/elasticsearch-dsl-py#916
109
# See more: https://github.com/elastic/elasticsearch-dsl-py/issues/916

0 commit comments

Comments
 (0)