change imports to pydantic for ForwardRef to avoid crashes on 3.6
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
import uuid
|
||||
from dataclasses import dataclass
|
||||
from typing import Any, ForwardRef, List, Optional, TYPE_CHECKING, Tuple, Type, Union
|
||||
from typing import Any, List, Optional, TYPE_CHECKING, Tuple, Type, Union
|
||||
|
||||
from pydantic import BaseModel, create_model
|
||||
from pydantic.typing import evaluate_forwardref
|
||||
from pydantic.typing import ForwardRef, evaluate_forwardref
|
||||
from sqlalchemy import UniqueConstraint
|
||||
|
||||
import ormar # noqa I101
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
from typing import Any, ForwardRef, List, Optional, TYPE_CHECKING, Tuple, Type, Union
|
||||
from typing import Any, List, Optional, TYPE_CHECKING, Tuple, Type, Union
|
||||
|
||||
from pydantic.typing import evaluate_forwardref
|
||||
from pydantic.typing import ForwardRef, evaluate_forwardref
|
||||
import ormar # noqa: I100
|
||||
from ormar.fields import BaseField
|
||||
from ormar.fields.foreign_key import ForeignKeyField
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
from typing import Dict, ForwardRef, List, Optional, TYPE_CHECKING, Tuple, Type
|
||||
from typing import Dict, List, Optional, TYPE_CHECKING, Tuple, Type
|
||||
|
||||
import ormar
|
||||
from pydantic.typing import ForwardRef
|
||||
import ormar # noqa: I100
|
||||
from ormar.fields.foreign_key import ForeignKeyField
|
||||
from ormar.models.helpers.pydantic import populate_pydantic_default_values
|
||||
|
||||
|
||||
@ -1,10 +1,9 @@
|
||||
# type: ignore
|
||||
from typing import ForwardRef, List
|
||||
|
||||
import databases
|
||||
import pytest
|
||||
import sqlalchemy
|
||||
import sqlalchemy as sa
|
||||
from pydantic.typing import ForwardRef
|
||||
from sqlalchemy import create_engine
|
||||
|
||||
import ormar
|
||||
|
||||
Reference in New Issue
Block a user