Skip to content

Commit 42d98c7

Browse files
committed
Relax a bit supported type annotation for nullable SchemaField overload
1 parent c62d745 commit 42d98c7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/django_pydantic_field/fields.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ class PydanticSchemaField(JSONField[types.ST, types.ST]):
3232

3333
@ty.overload
3434
def SchemaField(
35-
schema: type[types.ST],
35+
schema: type[types.ST] | type[types.ST | None],
3636
config: types.ConfigType = ...,
37-
default: ty.Callable[[], _DT] | _DT | BaseExpression = ...,
37+
default: ty.Callable[[], _DT] | ty.Callable[[], _DT | None] | _DT | None | BaseExpression = ...,
3838
*args: ty.Any,
3939
null: ty.Literal[True],
4040
**kwargs: ty.Any,

0 commit comments

Comments
 (0)