diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1e83895..b96f5b4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.6', '3.7', '3.8', '3.9', '3.10'] + python-version: ['3.7', '3.8', '3.9', '3.10'] steps: - name: Checkout project uses: actions/checkout@v2 diff --git a/README.md b/README.md index 2d00d00..0eef412 100644 --- a/README.md +++ b/README.md @@ -271,7 +271,9 @@ Development =========== 1. Python 3.6+ -0. Install dependencies `requirements/dev.txt` and `requirements/extra.txt` +2. Install dependencies `requirements/dev.txt` and `requirements/extra.txt` +3. We use `isort` library to order and format our imports, and we check it using `flake8-isort` library (automatically on `flake8` run). +For convenience you may run `isort .` to order imports. Testing ======= diff --git a/dj_rql/constants.py b/dj_rql/constants.py index 95a7c0e..b4e3a59 100644 --- a/dj_rql/constants.py +++ b/dj_rql/constants.py @@ -3,7 +3,6 @@ # from django.db import models - from py_rql.constants import FilterLookups, FilterTypes as FT diff --git a/dj_rql/drf/backend.py b/dj_rql/drf/backend.py index 2788754..d547903 100644 --- a/dj_rql/drf/backend.py +++ b/dj_rql/drf/backend.py @@ -3,10 +3,10 @@ # from threading import Lock -from dj_rql.drf._utils import get_query - from rest_framework.filters import BaseFilterBackend +from dj_rql.drf._utils import get_query + lock = Lock() diff --git a/dj_rql/drf/compat.py b/dj_rql/drf/compat.py index 64efefe..c6f078e 100644 --- a/dj_rql/drf/compat.py +++ b/dj_rql/drf/compat.py @@ -4,12 +4,7 @@ from collections import Counter -from dj_rql.constants import DjangoLookups as DJL, FilterTypes -from dj_rql.drf._utils import get_query -from dj_rql.drf.backend import RQLFilterBackend - from py_rql.constants import ( - ComparisonOperators as CO, RQL_ANY_SYMBOL, RQL_FALSE, RQL_LIMIT_PARAM, @@ -17,10 +12,15 @@ RQL_OFFSET_PARAM, RQL_ORDERING_OPERATOR, RQL_TRUE, + ComparisonOperators as CO, SearchOperators as SO, ) from py_rql.exceptions import RQLFilterParsingError +from dj_rql.constants import DjangoLookups as DJL, FilterTypes +from dj_rql.drf._utils import get_query +from dj_rql.drf.backend import RQLFilterBackend + class CompatibilityRQLFilterBackend(RQLFilterBackend): """ diff --git a/dj_rql/drf/paginations.py b/dj_rql/drf/paginations.py index 7923837..908b567 100644 --- a/dj_rql/drf/paginations.py +++ b/dj_rql/drf/paginations.py @@ -2,17 +2,15 @@ # Copyright © 2022 Ingram Micro Inc. All rights reserved. # -from dj_rql.drf._utils import get_query -from dj_rql.transformer import RQLLimitOffsetTransformer - from lark.exceptions import LarkError - from py_rql.exceptions import RQLFilterParsingError from py_rql.parser import RQLParser - from rest_framework.pagination import LimitOffsetPagination, _positive_int from rest_framework.response import Response +from dj_rql.drf._utils import get_query +from dj_rql.transformer import RQLLimitOffsetTransformer + class RQLLimitOffsetPagination(LimitOffsetPagination): """ RQL limit offset pagination. """ diff --git a/dj_rql/filter_cls.py b/dj_rql/filter_cls.py index 91deb76..c73ed24 100644 --- a/dj_rql/filter_cls.py +++ b/dj_rql/filter_cls.py @@ -8,23 +8,18 @@ from datetime import datetime from uuid import uuid4 -from dj_rql._dataclasses import FilterArgs, OptimizationArgs -from dj_rql.constants import DjangoLookups, FilterTypes, SUPPORTED_FIELD_TYPES -from dj_rql.fields import SelectField -from dj_rql.openapi import RQLFilterClassSpecification -from dj_rql.qs import Annotation, NPR, NSR -from dj_rql.transformer import RQLToDjangoORMTransformer - -from django.db.models import ForeignKey, ManyToManyField, Model, OneToOneField, OneToOneRel, Q +from django.db.models import ( + ForeignKey, + ManyToManyField, + Model, + OneToOneField, + OneToOneRel, + Q, +) from django.utils.dateparse import parse_date, parse_datetime from django.utils.functional import cached_property - from lark.exceptions import LarkError - from py_rql.constants import ( - ComparisonOperators, - FilterLookups, - ListOperators, RESERVED_FILTER_NAMES, RQL_ANY_SYMBOL, RQL_EMPTY, @@ -34,11 +29,21 @@ RQL_PLUS, RQL_SEARCH_PARAM, RQL_TRUE, + ComparisonOperators, + FilterLookups, + ListOperators, SearchOperators, ) from py_rql.exceptions import RQLFilterLookupError, RQLFilterParsingError, RQLFilterValueError from py_rql.parser import RQLParser +from dj_rql._dataclasses import FilterArgs, OptimizationArgs +from dj_rql.constants import SUPPORTED_FIELD_TYPES, DjangoLookups, FilterTypes +from dj_rql.fields import SelectField +from dj_rql.openapi import RQLFilterClassSpecification +from dj_rql.qs import NPR, NSR, Annotation +from dj_rql.transformer import RQLToDjangoORMTransformer + iterable_types = (list, tuple) diff --git a/dj_rql/management/commands/generate_rql_class.py b/dj_rql/management/commands/generate_rql_class.py index 49bd942..6d6edce 100644 --- a/dj_rql/management/commands/generate_rql_class.py +++ b/dj_rql/management/commands/generate_rql_class.py @@ -5,12 +5,12 @@ import json import re -from dj_rql.filter_cls import NestedAutoRQLFilterClass - from django.core.management import BaseCommand from django.db.models import ForeignKey, OneToOneField, OneToOneRel from django.utils.module_loading import import_string +from dj_rql.filter_cls import NestedAutoRQLFilterClass + TEMPLATE = """from {model_package} import {model_name} diff --git a/dj_rql/openapi.py b/dj_rql/openapi.py index 9bce01a..bd62c00 100644 --- a/dj_rql/openapi.py +++ b/dj_rql/openapi.py @@ -5,12 +5,15 @@ from copy import copy from numbers import Number -from dj_rql.constants import FilterTypes - from py_rql.constants import ( - FilterLookups, RQL_NULL, RQL_ORDERING_OPERATOR, RQL_SEARCH_PARAM, + RQL_NULL, + RQL_ORDERING_OPERATOR, + RQL_SEARCH_PARAM, + FilterLookups, ) +from dj_rql.constants import FilterTypes + class RQLFilterDescriptionTemplate: BASE_TEMPLATE = '{description}\n\n**lookups:** {lookups}' diff --git a/dj_rql/transformer.py b/dj_rql/transformer.py index a745ec7..32b3690 100644 --- a/dj_rql/transformer.py +++ b/dj_rql/transformer.py @@ -2,19 +2,18 @@ # Copyright © 2022 Ingram Micro Inc. All rights reserved. # -from dj_rql._dataclasses import FilterArgs - from lark import Tree - from py_rql.constants import ( + RQL_LIMIT_PARAM, + RQL_OFFSET_PARAM, ComparisonOperators, ListOperators, LogicalOperators, - RQL_LIMIT_PARAM, - RQL_OFFSET_PARAM, ) from py_rql.transformer import BaseRQLTransformer +from dj_rql._dataclasses import FilterArgs + class RQLToDjangoORMTransformer(BaseRQLTransformer): """ Parsed RQL AST tree transformer to Django ORM Query. diff --git a/docs/conf.py b/docs/conf.py index 25d5e7f..2c2c540 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -3,7 +3,6 @@ from datetime import datetime import django - from setuptools_scm import get_version diff --git a/requirements/test.txt b/requirements/test.txt index 6f47033..88c0ff2 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -18,6 +18,7 @@ flake8-commas==2.0.0 flake8-comprehensions==3.7.0 flake8-debugger==4.0.0 flake8-eradicate==1.1.0 -flake8-import-order==0.18.1 +flake8-isort==5.0.3 flake8-string-format==0.3.0 -importlib-metadata>=4.0.0,<5.0.0 \ No newline at end of file +importlib-metadata>=4.0.0,<5.0.0 +isort==5.10.1 diff --git a/setup.cfg b/setup.cfg index 22599f6..b766da5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -12,3 +12,15 @@ addopts = --show-capture=no --create-db --nomigrations --junitxml=tests/reports/ filterwarnings = ignore::UserWarning DJANGO_SETTINGS_MODULE = tests.dj_rf.settings + +[isort] +src_paths = * +sections = FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER +group_by_package = True +multi_line_output = 3 +force_grid_wrap = 4 +combine_as_imports = True +use_parentheses = True +include_trailing_comma = True +line_length = 100 +lines_after_imports = 2 diff --git a/tests/constants.py b/tests/constants.py index 139430f..f27c325 100644 --- a/tests/constants.py +++ b/tests/constants.py @@ -3,7 +3,12 @@ # from py_rql.constants import ( - ComparisonOperators, ListOperators, LogicalOperators, RQL_EMPTY, RQL_NULL, SearchOperators, + RQL_EMPTY, + RQL_NULL, + ComparisonOperators, + ListOperators, + LogicalOperators, + SearchOperators, ) diff --git a/tests/dj_rf/filters.py b/tests/dj_rf/filters.py index 39d7809..f4a6dc3 100644 --- a/tests/dj_rf/filters.py +++ b/tests/dj_rf/filters.py @@ -4,15 +4,22 @@ from copy import deepcopy from cachetools import LFUCache, LRUCache +from django.db.models import ( + AutoField, + CharField, + F, + IntegerField, +) +from py_rql.constants import RQL_NULL, FilterLookups from dj_rql.fields import SelectField from dj_rql.filter_cls import RQLFilterClass -from dj_rql.qs import AN, NSR, PR, SR - -from django.db.models import AutoField, CharField, F, IntegerField - -from py_rql.constants import FilterLookups, RQL_NULL - +from dj_rql.qs import ( + AN, + NSR, + PR, + SR, +) from tests.dj_rf.models import Book diff --git a/tests/dj_rf/models.py b/tests/dj_rf/models.py index 03e1f10..6979ecf 100644 --- a/tests/dj_rf/models.py +++ b/tests/dj_rf/models.py @@ -5,9 +5,7 @@ from uuid import uuid4 from django.db import models - from django_fsm import FSMField - from model_utils import Choices diff --git a/tests/dj_rf/serializers.py b/tests/dj_rf/serializers.py index 881fcf8..07fcbd4 100644 --- a/tests/dj_rf/serializers.py +++ b/tests/dj_rf/serializers.py @@ -2,11 +2,15 @@ # Copyright © 2022 Ingram Micro Inc. All rights reserved. # -from dj_rql.drf.serializers import RQLMixin - from rest_framework import serializers -from tests.dj_rf.models import Author, Book, Page, Publisher +from dj_rql.drf.serializers import RQLMixin +from tests.dj_rf.models import ( + Author, + Book, + Page, + Publisher, +) class PublisherReferenceSerializer(RQLMixin, serializers.ModelSerializer): diff --git a/tests/dj_rf/settings.py b/tests/dj_rf/settings.py index 4d73ba9..4a45e4e 100644 --- a/tests/dj_rf/settings.py +++ b/tests/dj_rf/settings.py @@ -4,6 +4,7 @@ import os + BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '6^1@%4#qtc+bookwp4w5k-+nbo+clm!skzdhnyl@rf&06b5tl6' diff --git a/tests/dj_rf/urls.py b/tests/dj_rf/urls.py index f1c6c53..0ef4a77 100644 --- a/tests/dj_rf/urls.py +++ b/tests/dj_rf/urls.py @@ -4,11 +4,14 @@ from django.conf.urls import include from django.urls import re_path - from rest_framework.routers import SimpleRouter from tests.dj_rf.view import ( - AutoViewSet, DRFViewSet, DjangoFiltersViewSet, DynamicFilterClsViewSet, NoFilterClsViewSet, + AutoViewSet, + DjangoFiltersViewSet, + DRFViewSet, + DynamicFilterClsViewSet, + NoFilterClsViewSet, SelectViewSet, ) diff --git a/tests/dj_rf/view.py b/tests/dj_rf/view.py index de2f9b2..994aa95 100644 --- a/tests/dj_rf/view.py +++ b/tests/dj_rf/view.py @@ -2,20 +2,20 @@ # Copyright © 2022 Ingram Micro Inc. All rights reserved. # -from dj_rql.drf.backend import RQLFilterBackend -from dj_rql.drf.compat import DjangoFiltersRQLFilterBackend -from dj_rql.drf.paginations import RQLContentRangeLimitOffsetPagination -from dj_rql.filter_cls import AutoRQLFilterClass - from django.db.models import CharField, IntegerField, Value - from rest_framework import mixins from rest_framework.decorators import action from rest_framework.response import Response from rest_framework.viewsets import GenericViewSet +from dj_rql.drf.backend import RQLFilterBackend +from dj_rql.drf.compat import DjangoFiltersRQLFilterBackend +from dj_rql.drf.paginations import RQLContentRangeLimitOffsetPagination +from dj_rql.filter_cls import AutoRQLFilterClass from tests.dj_rf.filters import ( - BooksFilterClass, SelectBooksFilterClass, SelectDetailedBooksFilterClass, + BooksFilterClass, + SelectBooksFilterClass, + SelectDetailedBooksFilterClass, ) from tests.dj_rf.models import Book from tests.dj_rf.serializers import BookSerializer, SelectBookSerializer diff --git a/tests/test_commands/test_generate_rql_class.py b/tests/test_commands/test_generate_rql_class.py index f96bd83..b2b00db 100644 --- a/tests/test_commands/test_generate_rql_class.py +++ b/tests/test_commands/test_generate_rql_class.py @@ -4,9 +4,8 @@ import os -from django.core.management import call_command - import pytest +from django.core.management import call_command from tests.dj_rf.models import AutoMain, Publisher diff --git a/tests/test_drf/conftest.py b/tests/test_drf/conftest.py index 40d3b93..c6b495e 100644 --- a/tests/test_drf/conftest.py +++ b/tests/test_drf/conftest.py @@ -2,12 +2,11 @@ # Copyright © 2021 Ingram Micro Inc. All rights reserved. # -from dj_rql.drf.backend import RQLFilterBackend, _FilterClassCache - import pytest - from rest_framework.test import APIClient +from dj_rql.drf.backend import RQLFilterBackend, _FilterClassCache + @pytest.fixture def api_client(): diff --git a/tests/test_drf/test_common_drf_backend.py b/tests/test_drf/test_common_drf_backend.py index 047e6df..b45aaa5 100644 --- a/tests/test_drf/test_common_drf_backend.py +++ b/tests/test_drf/test_common_drf_backend.py @@ -1,19 +1,15 @@ # # Copyright © 2022 Ingram Micro Inc. All rights reserved. # +import pytest from cachetools import LFUCache, LRUCache - -from dj_rql.drf import RQLFilterBackend -from dj_rql.drf.backend import _FilterClassCache - from django.db import connection from django.test.utils import CaptureQueriesContext - -import pytest - from rest_framework.reverse import reverse from rest_framework.status import HTTP_200_OK, HTTP_404_NOT_FOUND +from dj_rql.drf import RQLFilterBackend +from dj_rql.drf.backend import _FilterClassCache from tests.dj_rf.models import Book diff --git a/tests/test_drf/test_django_filters_backend.py b/tests/test_drf/test_django_filters_backend.py index c0ade9c..505514c 100644 --- a/tests/test_drf/test_django_filters_backend.py +++ b/tests/test_drf/test_django_filters_backend.py @@ -2,19 +2,15 @@ # Copyright © 2022 Ingram Micro Inc. All rights reserved. # -from dj_rql.constants import DjangoLookups -from dj_rql.drf.compat import CompatibilityRQLFilterBackend, DjangoFiltersRQLFilterBackend - +import pytest from django.http import QueryDict from django.utils.timezone import now - from py_rql.exceptions import RQLFilterParsingError, RQLFilterValueError - -import pytest - from rest_framework.reverse import reverse from rest_framework.status import HTTP_200_OK +from dj_rql.constants import DjangoLookups +from dj_rql.drf.compat import CompatibilityRQLFilterBackend, DjangoFiltersRQLFilterBackend from tests.dj_rf.filters import BooksFilterClass from tests.dj_rf.models import Author, Book diff --git a/tests/test_drf/test_dynamic_filter.py b/tests/test_drf/test_dynamic_filter.py index a622ab3..37bb571 100644 --- a/tests/test_drf/test_dynamic_filter.py +++ b/tests/test_drf/test_dynamic_filter.py @@ -3,7 +3,6 @@ # import pytest - from rest_framework.reverse import reverse from rest_framework.status import HTTP_200_OK diff --git a/tests/test_drf/test_pagination.py b/tests/test_drf/test_pagination.py index dc3acb6..7a285b8 100644 --- a/tests/test_drf/test_pagination.py +++ b/tests/test_drf/test_pagination.py @@ -4,14 +4,13 @@ from unittest import TestCase -from dj_rql.drf import RQLContentRangeLimitOffsetPagination - from py_rql.exceptions import RQLFilterParsingError - from rest_framework.pagination import PAGE_BREAK, PageLink from rest_framework.request import Request from rest_framework.test import APIRequestFactory +from dj_rql.drf import RQLContentRangeLimitOffsetPagination + factory = APIRequestFactory() diff --git a/tests/test_drf/test_select.py b/tests/test_drf/test_select.py index 19ad751..d4c6227 100644 --- a/tests/test_drf/test_select.py +++ b/tests/test_drf/test_select.py @@ -3,11 +3,15 @@ # import pytest - from rest_framework.reverse import reverse from rest_framework.status import HTTP_200_OK -from tests.dj_rf.models import Author, Book, Page, Publisher +from tests.dj_rf.models import ( + Author, + Book, + Page, + Publisher, +) @pytest.mark.django_db diff --git a/tests/test_drf/test_serializers.py b/tests/test_drf/test_serializers.py index 3f6cf1b..4789a4b 100644 --- a/tests/test_drf/test_serializers.py +++ b/tests/test_drf/test_serializers.py @@ -6,7 +6,12 @@ import pytest -from tests.dj_rf.models import Author, Book, Page, Publisher +from tests.dj_rf.models import ( + Author, + Book, + Page, + Publisher, +) from tests.dj_rf.serializers import SelectBookSerializer diff --git a/tests/test_filter_cls/test_apply_filters.py b/tests/test_filter_cls/test_apply_filters.py index e4afaf6..6726585 100644 --- a/tests/test_filter_cls/test_apply_filters.py +++ b/tests/test_filter_cls/test_apply_filters.py @@ -4,17 +4,14 @@ from functools import partial -from dj_rql.filter_cls import RQLFilterClass - +import pytest from django.core.exceptions import FieldError from django.db.models import IntegerField, Q from django.utils.timezone import now - -from py_rql.constants import FilterLookups, ListOperators, RQL_NULL +from py_rql.constants import RQL_NULL, FilterLookups, ListOperators from py_rql.exceptions import RQLFilterLookupError, RQLFilterParsingError, RQLFilterValueError -import pytest - +from dj_rql.filter_cls import RQLFilterClass from tests.dj_rf.filters import BooksFilterClass from tests.dj_rf.models import Author, Book, Publisher from tests.test_filter_cls.utils import book_qs, create_books diff --git a/tests/test_filter_cls/test_fields_filtering.py b/tests/test_filter_cls/test_fields_filtering.py index db08d2b..3626485 100644 --- a/tests/test_filter_cls/test_fields_filtering.py +++ b/tests/test_filter_cls/test_fields_filtering.py @@ -5,23 +5,25 @@ from datetime import date, datetime from functools import partial -from dj_rql._dataclasses import FilterArgs -from dj_rql.constants import DjangoLookups - +import pytest from django.db.models import Q - from py_rql.constants import ( - ComparisonOperators as CO, RQL_EMPTY, RQL_NULL, + ComparisonOperators as CO, SearchOperators, ) from py_rql.exceptions import RQLFilterLookupError, RQLFilterParsingError, RQLFilterValueError -import pytest - +from dj_rql._dataclasses import FilterArgs +from dj_rql.constants import DjangoLookups from tests.dj_rf.filters import BooksFilterClass -from tests.dj_rf.models import Author, Book, Page, Publisher +from tests.dj_rf.models import ( + Author, + Book, + Page, + Publisher, +) from tests.test_filter_cls.utils import book_qs, create_books diff --git a/tests/test_filter_cls/test_initialization.py b/tests/test_filter_cls/test_initialization.py index f68d121..9b4c08c 100644 --- a/tests/test_filter_cls/test_initialization.py +++ b/tests/test_filter_cls/test_initialization.py @@ -2,19 +2,17 @@ # Copyright © 2022 Ingram Micro Inc. All rights reserved. # -from dj_rql.filter_cls import AutoRQLFilterClass, NestedAutoRQLFilterClass, RQLFilterClass -from dj_rql.utils import assert_filter_cls - -from django.core.exceptions import FieldDoesNotExist - -from py_rql.constants import FilterLookups as FL, RESERVED_FILTER_NAMES, RQL_NULL - import pytest +from django.core.exceptions import FieldDoesNotExist +from py_rql.constants import RESERVED_FILTER_NAMES, RQL_NULL, FilterLookups as FL +from dj_rql.filter_cls import AutoRQLFilterClass, NestedAutoRQLFilterClass, RQLFilterClass +from dj_rql.utils import assert_filter_cls from tests.data import get_book_filter_cls_ordering_data, get_book_filter_cls_search_data from tests.dj_rf.filters import AUTHOR_FILTERS, BooksFilterClass from tests.dj_rf.models import Author, AutoMain, Book + empty_qs = Author.objects.none() diff --git a/tests/test_filter_cls/test_select.py b/tests/test_filter_cls/test_select.py index 05f034e..b6bc7bf 100644 --- a/tests/test_filter_cls/test_select.py +++ b/tests/test_filter_cls/test_select.py @@ -2,17 +2,21 @@ # Copyright © 2022 Ingram Micro Inc. All rights reserved. # -from dj_rql.fields import SelectField -from dj_rql.filter_cls import RQLFilterClass -from dj_rql.qs import AN, CH, NPR, NSR, PR, SR - +import pytest from django.core.exceptions import FieldError from django.db.models import CharField, IntegerField, Value - from py_rql.exceptions import RQLFilterParsingError -import pytest - +from dj_rql.fields import SelectField +from dj_rql.filter_cls import RQLFilterClass +from dj_rql.qs import ( + AN, + CH, + NPR, + NSR, + PR, + SR, +) from tests.dj_rf.models import Author, Book from tests.test_filter_cls.utils import book_qs diff --git a/tests/test_openapi.py b/tests/test_openapi.py index 1b1f00f..54d5230 100644 --- a/tests/test_openapi.py +++ b/tests/test_openapi.py @@ -4,10 +4,9 @@ from copy import copy -from dj_rql.openapi import RQLFilterClassSpecification, RQLFilterDescriptionTemplate - from rest_framework.schemas.openapi import SchemaGenerator +from dj_rql.openapi import RQLFilterClassSpecification, RQLFilterDescriptionTemplate from tests.dj_rf.filters import BooksFilterClass from tests.dj_rf.models import Book diff --git a/tests/test_qs.py b/tests/test_qs.py index caa210c..91a63e7 100644 --- a/tests/test_qs.py +++ b/tests/test_qs.py @@ -2,23 +2,21 @@ # Copyright © 2021 Ingram Micro Inc. All rights reserved. # +import pytest +from django.db.models import IntegerField, Prefetch, Value + from dj_rql.qs import ( + NPR, + NSR, Annotation, Chain, DBOptimization, - NPR, - NSR, NestedPrefetchRelated, NestedSelectRelated, PrefetchRelated, SelectRelated, _NestedOptimizationMixin, ) - -from django.db.models import IntegerField, Prefetch, Value - -import pytest - from tests.dj_rf.models import Book diff --git a/tests/test_utils.py b/tests/test_utils.py index a086625..43571dd 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -2,10 +2,9 @@ # Copyright © 2021 Ingram Micro Inc. All rights reserved. # -from dj_rql.utils import assert_filter_cls - import pytest +from dj_rql.utils import assert_filter_cls from tests.data import get_book_filter_cls_ordering_data, get_book_filter_cls_search_data from tests.dj_rf.filters import BooksFilterClass