Skip to content

Commit

Permalink
chore: fix comment for pack_models
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenbreddels committed Mar 28, 2023
1 parent a2cf047 commit b2a41d4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/base/src/widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,12 @@ export function unpack_models(

/** Replace models with ids recursively.
*
* If the commonly-used `unpack_models` is given as the `seralize` method,
* and no `deserialize` is given, this will be used as a default.
* If the commonly-used `unpack_models` is given as the `deseralize` method,
* pack_models would be the appropriate `serialize`.
* However, the default serialize method will have the same effect, when
* `unpack_models` is used as the deserialize method.
* This is to ensure backwards compatibility, see:
* https://github.com/jupyter-widgets/ipywidgets/pull/3738/commits/f9e27328bb631eb5247a7a6563595d3e655492c7#diff-efb19099381ae8911dd7f69b015a0138d08da7164512c1ee112aa75100bc9be2
*/
export function pack_models(
value: WidgetModel | Dict<WidgetModel> | WidgetModel[] | any,
Expand Down

0 comments on commit b2a41d4

Please sign in to comment.