Skip to content

Commit 8622b10

Browse files
committed
fixing lint
1 parent 9a07177 commit 8622b10

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

readthedocs/search/management/commands/reindex_elasticsearch.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ def _run_reindex_tasks(self, models):
4848
new_index_name=new_index_name)
4949

5050
indexing_tasks = self._get_indexing_tasks(app_label=app_label, model_name=model_name,
51-
instance_ids=instance_ids, document_class=str(doc),
51+
instance_ids=instance_ids,
52+
document_class=str(doc),
5253
index_name=new_index_name)
5354

5455
post_index_task = switch_es_index_task.si(app_label=app_label, model_name=model_name,

readthedocs/search/mixins.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33

44

55
class RTDDocTypeMixin(object):
6-
"""Override some methods of DocType of DED
7-
6+
"""
7+
Override some methods of DocType of DED
88
Changelog as following:
99
- Do not index object that not exist in the provided queryset
1010
- Take additional argument in update method `index_name` to update specific index
11-
1211
Issues:
1312
- https://github.com/sabricot/django-elasticsearch-dsl/issues/111
1413
"""
@@ -37,9 +36,7 @@ def _get_actions(self, object_list, action, index_name=None):
3736
yield self._prepare_action(object_instance, action, index_name)
3837

3938
def update(self, thing, refresh=None, action='index', index_name=None, **kwargs):
40-
"""
41-
Update each document in ES for a model, iterable of models or queryset
42-
"""
39+
"""Update each document in ES for a model, iterable of models or queryset"""
4340
if refresh is True or (
4441
refresh is None and self._doc_type.auto_refresh
4542
):
@@ -62,4 +59,4 @@ def update(self, thing, refresh=None, action='index', index_name=None, **kwargs)
6259

6360
return self.bulk(
6461
self._get_actions(object_list, action, index_name=index_name), **kwargs
65-
)
62+
)

readthedocs/search/tasks.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ def index_missing_objects_task(app_label, model_name, document_class, indexed_in
7272
and they will not be in the tasks.
7373
This task will index all the objects excluding the ones which have got indexed already
7474
"""
75-
7675
model = apps.get_model(app_label, model_name)
7776
document = _get_document(model=model, document_class=document_class)
7877
queryset = document().get_queryset().exclude(id__in=indexed_instance_ids)

0 commit comments

Comments
 (0)