Skip to content

Commit

Permalink
Revert "models:reference_files - ActionData excludes defaults on dump"
Browse files Browse the repository at this point in the history
This reverts commit ff21f14.
  • Loading branch information
MatteoCampinoti94 committed Nov 3, 2023
1 parent 41650ee commit d78c5aa
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions acacore/models/reference_files.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
"""Data models for the data on saved to different .json files on the `reference_files` repo."""
from typing import Any
from typing import Literal
from typing import Optional
from typing import Union

from pydantic import BaseModel
from pydantic import Field
Expand Down Expand Up @@ -114,31 +112,6 @@ class ActionData(BaseModel):
ignore: Optional[IgnoreAction] = None
reidentify: Optional[ReIdentifyAction] = None

def model_dump(
self,
*,
mode: Literal["json", "python"] | str = "python",
include: Optional[Union[set[int], set[str], dict[int, Any], dict[str, Any]]] = None,
exclude: Optional[Union[set[int], set[str], dict[int, Any], dict[str, Any]]] = None,
by_alias: bool = False,
exclude_unset: bool = False,
exclude_defaults: bool = True, # noqa: ARG002
exclude_none: bool = False,
round_trip: bool = False,
warnings: bool = True,
) -> dict[str, Any]:
return super().model_dump(
mode=mode,
include=include,
exclude=exclude,
by_alias=by_alias,
exclude_unset=exclude_unset,
exclude_defaults=True,
exclude_none=exclude_none,
round_trip=round_trip,
warnings=warnings,
)


class Action(ActionData):
name: str
Expand Down

0 comments on commit d78c5aa

Please sign in to comment.