Skip to content

Commit

Permalink
Normalize the default for partial in Schema to None
Browse files Browse the repository at this point in the history
  • Loading branch information
deckar01 committed Jul 18, 2023
1 parent 8197492 commit 1b2ab4f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/marshmallow/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ def __init__(
context: dict | None = None,
load_only: types.StrSequenceOrSet = (),
dump_only: types.StrSequenceOrSet = (),
partial: bool | types.StrSequenceOrSet = False,
partial: bool | types.StrSequenceOrSet | None = None,
unknown: str | None = None,
):
# Raise error if only or exclude is passed as string, not list of strings
Expand Down Expand Up @@ -590,7 +590,7 @@ def _deserialize(
*,
error_store: ErrorStore,
many: bool = False,
partial=False,
partial=None,
unknown=RAISE,
index=None,
) -> _T | list[_T]:
Expand Down Expand Up @@ -1089,7 +1089,7 @@ def _invoke_load_processors(
*,
many: bool,
original_data,
partial: bool | types.StrSequenceOrSet,
partial: bool | types.StrSequenceOrSet | None,
):
# This has to invert the order of the dump processors, so run the pass_many
# processors first.
Expand Down Expand Up @@ -1166,7 +1166,7 @@ def _invoke_schema_validators(
data,
original_data,
many: bool,
partial: bool | types.StrSequenceOrSet,
partial: bool | types.StrSequenceOrSet | None,
field_errors: bool = False,
):
for attr_name in self._hooks[(VALIDATES_SCHEMA, pass_many)]:
Expand Down

0 comments on commit 1b2ab4f

Please sign in to comment.