From b36556ea94007395b53d78db3fa28e1b9e39b7f3 Mon Sep 17 00:00:00 2001 From: Nikki Everett Date: Thu, 11 Apr 2024 22:40:21 -0500 Subject: [PATCH] Re-apply changes to dataclass docs from flytesnacks#1553 (#5211) * copy changes over from flytesnacks#1553 Signed-off-by: nikki everett * fix formatting Signed-off-by: nikki everett * fix 404 error Signed-off-by: nikki everett --------- Signed-off-by: nikki everett --- docs/user_guide/data_types_and_io/dataclass.md | 3 +++ docs/user_guide/data_types_and_io/index.md | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/user_guide/data_types_and_io/dataclass.md b/docs/user_guide/data_types_and_io/dataclass.md index fdb9f1d992..7bdaee0385 100644 --- a/docs/user_guide/data_types_and_io/dataclass.md +++ b/docs/user_guide/data_types_and_io/dataclass.md @@ -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. diff --git a/docs/user_guide/data_types_and_io/index.md b/docs/user_guide/data_types_and_io/index.md index f55aec69b4..d03df92804 100644 --- a/docs/user_guide/data_types_and_io/index.md +++ b/docs/user_guide/data_types_and_io/index.md @@ -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