Skip to content

Commit 3dd579e

Browse files
committed
Use typing_extensions for Annotated imports
1 parent 07702ad commit 3dd579e

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

ninja/signature/details.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import inspect
22
import warnings
33
from collections import defaultdict, namedtuple
4+
from sys import version_info
45
from typing import Any, Callable, Dict, Generator, List, Optional, Tuple
56

67
import pydantic
78
from django.http import HttpResponse
89
from pydantic.fields import FieldInfo
910
from pydantic_core import PydanticUndefined
1011
from typing_extensions import Annotated, get_args, get_origin
11-
from sys import version_info
1212

1313
from ninja import UploadedFile
1414
from ninja.compatibility.util import UNION_TYPES

tests/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
from typing import Annotated, List, Optional
1+
from typing import List, Optional
22
from uuid import UUID
33

44
import pydantic
55
from django.urls import register_converter
6+
from typing_extensions import Annotated
67

78
from ninja import Field, P, Path, PathEx, Query, Router, Schema
89

tests/test_openapi_schema.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import sys
2-
from typing import Annotated, Any, List, Union
2+
from typing import Any, List, Union
33
from unittest.mock import Mock
4+
from typing_extensions import Annotated
45

56
import pydantic
67
import pytest

0 commit comments

Comments
 (0)