Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
thejaminator committed May 20, 2023
1 parent df87fb7 commit 017e168
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
1 change: 1 addition & 0 deletions strawberry/experimental/pydantic/conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from strawberry.union import StrawberryUnion

if TYPE_CHECKING:
from strawberry.field import StrawberryField
from strawberry.type import StrawberryType


Expand Down
3 changes: 1 addition & 2 deletions strawberry/experimental/pydantic/error_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,18 @@
)

from pydantic import BaseModel
from pydantic.utils import lenient_issubclass

from strawberry.auto import StrawberryAuto
from strawberry.experimental.pydantic.utils import (
get_private_fields,
get_strawberry_type_from_model,
normalize_type,
)
from strawberry.experimental.pydantic.v2_compat import lenient_issubclass
from strawberry.object_type import _process_type, _wrap_dataclass
from strawberry.types.type_resolver import _get_fields
from strawberry.utils.typing import get_list_annotation, is_list


from .exceptions import MissingFieldsListError

if TYPE_CHECKING:
Expand Down
11 changes: 4 additions & 7 deletions strawberry/experimental/pydantic/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@

import pydantic
from pydantic import BaseModel
from strawberry.experimental.pydantic.v2_compat import (
lenient_issubclass,
get_args,
get_origin,
is_new_type,
new_type_supertype,
)
from pydantic.typing import get_args, get_origin, is_new_type, new_type_supertype
from pydantic.utils import lenient_issubclass

from strawberry.experimental.pydantic.exceptions import (
UnregisteredTypeException,
UnsupportedTypeError,
Expand Down Expand Up @@ -74,6 +70,7 @@
"RedisDsn": str,
}


FIELDS_MAP = {
getattr(pydantic, field_name): type
for field_name, type in ATTR_TO_TYPE_MAP.items()
Expand Down
1 change: 1 addition & 0 deletions strawberry/experimental/pydantic/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
cast,
)

from pydantic.utils import smart_deepcopy

from strawberry.experimental.pydantic.exceptions import (
AutoFieldsNotInBaseModelError,
Expand Down

0 comments on commit 017e168

Please sign in to comment.