Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Pliner committed Dec 11, 2023
1 parent f9a8a32 commit 4cec884
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions marshmallow_recipe/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -634,8 +634,8 @@ def _deserialize(self, value: Any, attr: Any, data: Any, **kwargs: Any) -> Any:
StrField = StrFieldV3

class DateTimeFieldV3(m.fields.DateTime):
DATEFORMAT_SERIALIZATION_FUNCS = {
**m.fields.DateTime.DATEFORMAT_SERIALIZATION_FUNCS,
SERIALIZATION_FUNCS = {
**m.fields.DateTime.SERIALIZATION_FUNCS, # type: ignore
**(
{
"iso": datetime.datetime.isoformat,
Expand All @@ -645,8 +645,8 @@ class DateTimeFieldV3(m.fields.DateTime):
else {}
),
}
DATEFORMAT_DESERIALIZATION_FUNCS = {
**m.fields.DateTime.DATEFORMAT_DESERIALIZATION_FUNCS,
DESERIALIZATION_FUNCS = {
**m.fields.DateTime.DESERIALIZATION_FUNCS, # type: ignore
**(
{
"iso": datetime.datetime.fromisoformat,
Expand Down Expand Up @@ -865,7 +865,7 @@ def __isoformat(v: datetime.datetime, *, localtime: bool = False, **kwargs: Any)
return datetime.datetime.isoformat(v)

DATEFORMAT_SERIALIZATION_FUNCS = {
**m.fields.DateTime.DATEFORMAT_SERIALIZATION_FUNCS,
**m.fields.DateTime.DATEFORMAT_SERIALIZATION_FUNCS, # type: ignore
**(
{
"iso": __isoformat,
Expand All @@ -876,7 +876,7 @@ def __isoformat(v: datetime.datetime, *, localtime: bool = False, **kwargs: Any)
),
}
DATEFORMAT_DESERIALIZATION_FUNCS = {
**m.fields.DateTime.DATEFORMAT_DESERIALIZATION_FUNCS,
**m.fields.DateTime.DATEFORMAT_DESERIALIZATION_FUNCS, # type: ignore
**(
{
"iso": datetime.datetime.fromisoformat,
Expand Down

0 comments on commit 4cec884

Please sign in to comment.