Skip to content

Commit bf70da4

Browse files
committed
chore: format
1 parent 466d528 commit bf70da4

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

algoliasearch_django/registration.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
from __future__ import unicode_literals
22
import logging
33

4+
from django import __version__ as __django__version__
45
from django.db.models.signals import post_save
56
from django.db.models.signals import pre_delete
7+
from algoliasearch_django import __version__
68
from algoliasearch.search.client import SearchClientSync
79

810
from .models import AlgoliaIndex
@@ -34,8 +36,8 @@ def __init__(self, settings=SETTINGS):
3436

3537
self.__registered_models = {}
3638
self.client = SearchClientSync(app_id, api_key)
37-
self.client.add_user_agent("Algolia for Django", VERSION)
38-
self.client.add_user_agent("Django", django_version())
39+
self.client.add_user_agent("Algolia for Django", __version__)
40+
self.client.add_user_agent("Django", __django__version__)
3941

4042
def is_registered(self, model):
4143
"""Checks whether the given models is registered with Algolia engine"""

tests/test_index.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,9 @@ class WebsiteIndex(AlgoliaIndex):
303303
"word": "Street",
304304
"corrections": ["St"],
305305
}
306-
save_synonyms_response = self.client.save_synonyms(self.index.index_name, synonym_hit=[synonym])
306+
save_synonyms_response = self.client.save_synonyms(
307+
self.index.index_name, synonym_hit=[synonym]
308+
)
307309
self.client.wait_for_task(self.index.index_name, save_synonyms_response.task_id)
308310

309311
# When reindexing with no settings on the instance

0 commit comments

Comments
 (0)