Skip to content

Commit

Permalink
Cleanup imports
Browse files Browse the repository at this point in the history
  • Loading branch information
intgr committed May 10, 2024
1 parent 74bd4ca commit 1595a77
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
5 changes: 3 additions & 2 deletions rest_framework_nested/relations.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
model relationships with hyperlinks.
"""
from __future__ import annotations

from functools import reduce
from typing import Any, TypeVar, Generic
from typing import Any, Generic, TypeVar

from django.core.exceptions import ObjectDoesNotExist
from django.db.models import Model
from rest_framework.relations import HyperlinkedRelatedField, ObjectValueError, ObjectTypeError
from rest_framework.relations import HyperlinkedRelatedField, ObjectTypeError, ObjectValueError
from rest_framework.exceptions import ValidationError
from rest_framework.request import Request

Expand Down
5 changes: 2 additions & 3 deletions rest_framework_nested/routers.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,12 @@
"""

from __future__ import annotations

import sys
import re
from typing import Any

from rest_framework.routers import SimpleRouter, DefaultRouter
from rest_framework.viewsets import ViewSetMixin

from rest_framework.routers import DefaultRouter, SimpleRouter

if sys.version_info[0] < 3:
IDENTIFIER_REGEX = re.compile(r"^[^\d\W]\w*$")
Expand Down
2 changes: 1 addition & 1 deletion rest_framework_nested/viewsets.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

import contextlib
from typing import Any, Generic, TypeVar, Iterator
from typing import Any, Generic, Iterator, TypeVar

from django.core.exceptions import ImproperlyConfigured
from django.db.models import Model, QuerySet
Expand Down

0 comments on commit 1595a77

Please sign in to comment.