From f734344a710f0b297475c3ce24a89e19e2f389cb Mon Sep 17 00:00:00 2001 From: Asif Saif Uddin Date: Sun, 31 Mar 2019 08:57:37 +0600 Subject: [PATCH] isort fix --- rest_framework/compat.py | 3 +-- tests/test_permissions.py | 3 ++- tests/test_utils.py | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/rest_framework/compat.py b/rest_framework/compat.py index fbb6a2863..fd4950527 100644 --- a/rest_framework/compat.py +++ b/rest_framework/compat.py @@ -4,14 +4,13 @@ versions of Django/Python, and compatibility wrappers around optional packages. """ import sys +from collections.abc import Mapping, MutableMapping # noqa from django.conf import settings from django.core import validators from django.utils import six from django.views.generic import View -from collections.abc import Mapping, MutableMapping # noqa - try: from django.urls import ( # noqa URLPattern, diff --git a/tests/test_permissions.py b/tests/test_permissions.py index c53dae18b..04fb3700f 100644 --- a/tests/test_permissions.py +++ b/tests/test_permissions.py @@ -8,7 +8,6 @@ from django.contrib.auth.models import AnonymousUser, Group, Permission, User from django.db import models from django.test import TestCase from django.urls import ResolverMatch -from tests.models import BasicModel from rest_framework import ( HTTP_HEADER_ENCODING, RemovedInDRF310Warning, authentication, generics, @@ -19,6 +18,8 @@ from rest_framework.filters import DjangoObjectPermissionsFilter from rest_framework.routers import DefaultRouter from rest_framework.test import APIRequestFactory +from tests.models import BasicModel + factory = APIRequestFactory() diff --git a/tests/test_utils.py b/tests/test_utils.py index 17c1a9bef..996b3c8af 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -1,6 +1,5 @@ from django.conf.urls import url from django.test import TestCase, override_settings -from tests.models import BasicModel from rest_framework.decorators import action from rest_framework.routers import SimpleRouter @@ -11,6 +10,8 @@ from rest_framework.utils.urls import remove_query_param, replace_query_param from rest_framework.views import APIView from rest_framework.viewsets import ModelViewSet +from tests.models import BasicModel + class Root(APIView): pass