Skip to content

Commit 3bd1baa

Browse files
authored
Fix _IncEx type annotation (#1443)
1 parent f2a0bb8 commit 3bd1baa

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

python/pydantic_core/_pydantic_core.pyi

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ class SchemaValidator:
237237
`None` if the schema has no default value, otherwise a [`Some`][pydantic_core.Some] containing the default.
238238
"""
239239

240-
_IncEx: TypeAlias = set[int] | set[str] | dict[int, _IncEx] | dict[str, _IncEx] | None
240+
_IncEx: TypeAlias = set[int] | set[str] | dict[int, _IncEx | bool] | dict[str, _IncEx | bool]
241241

242242
@final
243243
class SchemaSerializer:
@@ -260,8 +260,8 @@ class SchemaSerializer:
260260
value: Any,
261261
*,
262262
mode: str | None = None,
263-
include: _IncEx = None,
264-
exclude: _IncEx = None,
263+
include: _IncEx | None = None,
264+
exclude: _IncEx | None = None,
265265
by_alias: bool = True,
266266
exclude_unset: bool = False,
267267
exclude_defaults: bool = False,
@@ -306,8 +306,8 @@ class SchemaSerializer:
306306
value: Any,
307307
*,
308308
indent: int | None = None,
309-
include: _IncEx = None,
310-
exclude: _IncEx = None,
309+
include: _IncEx | None = None,
310+
exclude: _IncEx | None = None,
311311
by_alias: bool = True,
312312
exclude_unset: bool = False,
313313
exclude_defaults: bool = False,
@@ -351,8 +351,8 @@ def to_json(
351351
value: Any,
352352
*,
353353
indent: int | None = None,
354-
include: _IncEx = None,
355-
exclude: _IncEx = None,
354+
include: _IncEx | None = None,
355+
exclude: _IncEx | None = None,
356356
by_alias: bool = True,
357357
exclude_none: bool = False,
358358
round_trip: bool = False,
@@ -426,8 +426,8 @@ def from_json(
426426
def to_jsonable_python(
427427
value: Any,
428428
*,
429-
include: _IncEx = None,
430-
exclude: _IncEx = None,
429+
include: _IncEx | None = None,
430+
exclude: _IncEx | None = None,
431431
by_alias: bool = True,
432432
exclude_none: bool = False,
433433
round_trip: bool = False,

0 commit comments

Comments
 (0)