Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 22, 2023
1 parent dc0b9dd commit 67feb7f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
16 changes: 7 additions & 9 deletions strawberry/experimental/pydantic/error_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ def get_type_for_field(field: ModelField) -> Union[Any, Type[None], Type[List]]:
return field_type_to_type(type_)




def field_type_to_type(type_: Type) -> Union[Any, List[Any], None]:
error_class: Any = str
strawberry_type: Any = error_class
Expand All @@ -68,13 +66,13 @@ def field_type_to_type(type_: Type) -> Union[Any, List[Any], None]:


def error_type(
model: Type[BaseModel],
*,
fields: Optional[List[str]] = None,
name: Optional[str] = None,
description: Optional[str] = None,
directives: Optional[Sequence[object]] = (),
all_fields: bool = False,
model: Type[BaseModel],
*,
fields: Optional[List[str]] = None,
name: Optional[str] = None,
description: Optional[str] = None,
directives: Optional[Sequence[object]] = (),
all_fields: bool = False,
) -> Callable[..., Type]:
def wrap(cls: Type) -> Type:
model_fields = get_model_fields(model)
Expand Down
1 change: 0 additions & 1 deletion strawberry/experimental/pydantic/object_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
from graphql import GraphQLResolveInfo



def get_type_for_field(field: CompatModelField, is_input: bool): # noqa: ANN201
outer_type = field.outer_type_
replaced_type = replace_types_recursively(outer_type, is_input)
Expand Down
1 change: 0 additions & 1 deletion strawberry/experimental/pydantic/v2_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class CompatModelField:


if pydantic.VERSION[0] == "2":

from pydantic._internal._utils import lenient_issubclass, smart_deepcopy

PYDANTIC_MISSING_TYPE = PydanticUndefined
Expand Down

0 comments on commit 67feb7f

Please sign in to comment.