Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcuts committed Nov 26, 2024
1 parent 466d528 commit bf70da4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions algoliasearch_django/registration.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from __future__ import unicode_literals
import logging

from django import __version__ as __django__version__
from django.db.models.signals import post_save
from django.db.models.signals import pre_delete
from algoliasearch_django import __version__
from algoliasearch.search.client import SearchClientSync

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

self.__registered_models = {}
self.client = SearchClientSync(app_id, api_key)
self.client.add_user_agent("Algolia for Django", VERSION)
self.client.add_user_agent("Django", django_version())
self.client.add_user_agent("Algolia for Django", __version__)
self.client.add_user_agent("Django", __django__version__)

def is_registered(self, model):
"""Checks whether the given models is registered with Algolia engine"""
Expand Down
4 changes: 3 additions & 1 deletion tests/test_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,9 @@ class WebsiteIndex(AlgoliaIndex):
"word": "Street",
"corrections": ["St"],
}
save_synonyms_response = self.client.save_synonyms(self.index.index_name, synonym_hit=[synonym])
save_synonyms_response = self.client.save_synonyms(
self.index.index_name, synonym_hit=[synonym]
)
self.client.wait_for_task(self.index.index_name, save_synonyms_response.task_id)

# When reindexing with no settings on the instance
Expand Down

0 comments on commit bf70da4

Please sign in to comment.