Skip to content

Commit 6056755

Browse files
committed
fix(main): allow bool type in Field exclude parameter type annotations
1 parent 8f44815 commit 6056755

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

sqlmodel/main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ def Field(
243243
serialization_alias: str | None = None,
244244
title: str | None = None,
245245
description: str | None = None,
246-
exclude: Set[int | str] | Mapping[int | str, Any] | Any = None,
246+
exclude: bool | Set[int | str] | Mapping[int | str, Any] | Any = None,
247247
include: Set[int | str] | Mapping[int | str, Any] | Any = None,
248248
const: bool | None = None,
249249
gt: float | None = None,
@@ -286,7 +286,7 @@ def Field(
286286
serialization_alias: str | None = None,
287287
title: str | None = None,
288288
description: str | None = None,
289-
exclude: Set[int | str] | Mapping[int | str, Any] | Any = None,
289+
exclude: bool | Set[int | str] | Mapping[int | str, Any] | Any = None,
290290
include: Set[int | str] | Mapping[int | str, Any] | Any = None,
291291
const: bool | None = None,
292292
gt: float | None = None,
@@ -338,7 +338,7 @@ def Field(
338338
serialization_alias: str | None = None,
339339
title: str | None = None,
340340
description: str | None = None,
341-
exclude: Set[int | str] | Mapping[int | str, Any] | Any = None,
341+
exclude: bool | Set[int | str] | Mapping[int | str, Any] | Any = None,
342342
include: Set[int | str] | Mapping[int | str, Any] | Any = None,
343343
const: bool | None = None,
344344
gt: float | None = None,
@@ -371,7 +371,7 @@ def Field(
371371
serialization_alias: str | None = None,
372372
title: str | None = None,
373373
description: str | None = None,
374-
exclude: Set[int | str] | Mapping[int | str, Any] | Any = None,
374+
exclude: bool | Set[int | str] | Mapping[int | str, Any] | Any = None,
375375
include: Set[int | str] | Mapping[int | str, Any] | Any = None,
376376
const: bool | None = None,
377377
gt: float | None = None,

0 commit comments

Comments
 (0)