Skip to content

Commit

Permalink
Re-apply changes to dataclass docs from flytesnacks#1553 (#5211)
Browse files Browse the repository at this point in the history
* copy changes over from flytesnacks#1553

Signed-off-by: nikki everett <[email protected]>

* fix formatting

Signed-off-by: nikki everett <[email protected]>

* fix 404 error

Signed-off-by: nikki everett <[email protected]>

---------

Signed-off-by: nikki everett <[email protected]>
  • Loading branch information
neverett authored Apr 12, 2024
1 parent 734d6f3 commit b36556e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions docs/user_guide/data_types_and_io/dataclass.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ to serialize and deserialize dataclasses.
:::{important}
If you're using Flytekit version below v1.10, you'll need to decorate with `@dataclass_json` using
`from dataclass_json import dataclass_json` instead of inheriting from Mashumaro's `DataClassJSONMixin`.

If you're using Flytekit version >= v1.11.1, you don't need to decorate with `@dataclass_json` or
inherit from Mashumaro's `DataClassJSONMixin`.
:::

To begin, import the necessary dependencies.
Expand Down
3 changes: 1 addition & 2 deletions docs/user_guide/data_types_and_io/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ Here's a breakdown of these mappings:
* - ``@dataclass``
- ``Struct``
- Automatic
- The class should be a pure value class that inherits from Mashumaro's DataClassJSONMixin,
and be annotated with the ``@dataclass`` decorator.
- The class should be a pure value class annotated with the ``@dataclass`` decorator.
* - ``np.ndarray``
- File
- Automatic
Expand Down

0 comments on commit b36556e

Please sign in to comment.