Skip to content

Commit

Permalink
Fix type stubs for annotated versions
Browse files Browse the repository at this point in the history
  • Loading branch information
surenkov committed Mar 26, 2024
1 parent 59203db commit 871af26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions django_pydantic_field/fields.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def SchemaField(
) -> ST | None: ...
@ty.overload
def SchemaField(
schema: te.Annotated[type[ST | None], ...] = ...,
schema: te.Annotated[ty.Type[ST | None], ...] = ...,
config: ConfigType = ...,
default: OptSchemaT | ty.Callable[[], OptSchemaT] | BaseExpression = ...,
*args,
Expand All @@ -105,7 +105,7 @@ def SchemaField(
) -> ST: ...
@ty.overload
def SchemaField(
schema: te.Annotated[ST, ...] = ...,
schema: te.Annotated[ty.Type[ST], ...] = ...,
config: ConfigType = ...,
default: SchemaT | ty.Callable[[], SchemaT] | BaseExpression = ...,
*args,
Expand Down
2 changes: 1 addition & 1 deletion django_pydantic_field/v2/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def __call__(self, col: Col | None = None, *args, **kwargs) -> Transform | None:

@ty.overload
def SchemaField(
schema: ty.Annotated[types.ST | None, ...] = ...,
schema: ty.Annotated[type[types.ST | None], ...] = ...,
config: pydantic.ConfigDict = ...,
default: types.SchemaT | ty.Callable[[], types.SchemaT | None] | BaseExpression | None = ...,
*args,
Expand Down

0 comments on commit 871af26

Please sign in to comment.