diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4ad4304..ac9a238 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,13 @@ repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v6.0.0 + hooks: + - id: check-case-conflict + - id: check-merge-conflict + - id: check-yaml + - id: end-of-file-fixer + - id: trailing-whitespace + - repo: https://github.com/asottile/pyupgrade rev: v3.21.2 hooks: diff --git a/README.md b/README.md index fbaeb45..2ab2031 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ The current maintainers are no longer actively using `drf-haystack` and would like to [hand over the project to other developers](https://github.com/rhblind/drf-haystack/issues/146) who are using the package. -We will still do the bare minimum maintenance of keeping dependency references +We will still do the bare minimum maintenance of keeping dependency references up to date with new releases of related packages **until January 1st 2026**. If by that time no new maintainers have joined to take over the project, we diff --git a/docs/01_intro.rst b/docs/01_intro.rst index 35d2e78..950e8ec 100644 --- a/docs/01_intro.rst +++ b/docs/01_intro.rst @@ -209,4 +209,3 @@ The default keyword is ``not``, but is configurable via settings using ``DRF_HAY http://example.com/api/v1/location/search/?city__not=Oslo http://example.com/api/v1/location/search/?city__not__contains=Los http://example.com/api/v1/location/search/?city__contains=Los&city__not__contains=Angeles - diff --git a/docs/02_autocomplete.rst b/docs/02_autocomplete.rst index 98ac0a1..40f7782 100644 --- a/docs/02_autocomplete.rst +++ b/docs/02_autocomplete.rst @@ -45,4 +45,3 @@ An example using the autocomplete filter might look something like this. index_models = [Location] serializer_class = AutocompleteSerializer filter_backends = [HaystackAutocompleteFilter] - diff --git a/drf_haystack/fields.py b/drf_haystack/fields.py index 14ae1ca..d89d2c9 100644 --- a/drf_haystack/fields.py +++ b/drf_haystack/fields.py @@ -105,5 +105,3 @@ class FacetListField(fields.ListField): def to_representation(self, key, data): return [self.child.to_representation(key, item) for item in data] - - diff --git a/drf_haystack/generics.py b/drf_haystack/generics.py index 92786f8..52a640b 100644 --- a/drf_haystack/generics.py +++ b/drf_haystack/generics.py @@ -93,7 +93,7 @@ def get_object(self): def filter_queryset(self, queryset): queryset = super().filter_queryset(queryset) - + if self.load_all: queryset = queryset.load_all() diff --git a/tests/__init__.py b/tests/__init__.py index ada3570..4b9fc75 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -47,4 +47,3 @@ def setup(): def teardown(): test_runner.teardown_databases(old_config) test_runner.teardown_test_environment() - diff --git a/tests/apps.py b/tests/apps.py index 3e347c8..bf3db91 100644 --- a/tests/apps.py +++ b/tests/apps.py @@ -4,4 +4,3 @@ class MockappConfig(AppConfig): name = "mockapp" verbose_name = "Mock Application" - diff --git a/tests/mockapp/templates/search/indexes/mockapp/mocklocation_text.txt b/tests/mockapp/templates/search/indexes/mockapp/mocklocation_text.txt index f4543e8..17d0d97 100644 --- a/tests/mockapp/templates/search/indexes/mockapp/mocklocation_text.txt +++ b/tests/mockapp/templates/search/indexes/mockapp/mocklocation_text.txt @@ -1,3 +1,3 @@ {{ object.address }} {{ object.zip_code }} {{ object.city }} Created: {{ object.created }} -Last modified: {{ object.updated }} \ No newline at end of file +Last modified: {{ object.updated }} diff --git a/tests/mockapp/templates/search/indexes/mockapp/mockpet_text.txt b/tests/mockapp/templates/search/indexes/mockapp/mockpet_text.txt index 28701c1..bd75d39 100644 --- a/tests/mockapp/templates/search/indexes/mockapp/mockpet_text.txt +++ b/tests/mockapp/templates/search/indexes/mockapp/mockpet_text.txt @@ -1 +1 @@ -{{ object.name }} \ No newline at end of file +{{ object.name }}