Skip to content

Commit

Permalink
Add strip_invalid_metadata argument to validator normalize method (#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Ruskin committed Mar 19, 2023
1 parent 3bc1b53 commit 85917af
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions nbformat/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ def normalize(
version_minor: Optional[int] = None,
*,
relax_add_props: bool = False,
strip_invalid_metadata: bool = False,
) -> Tuple[int, Any]:
"""
Normalise a notebook prior to validation.
Expand All @@ -282,8 +283,11 @@ def normalize(
version : int
version_minor : int
relax_add_props : bool
Wether to allow extra property in the Json schema validating the
Whether to allow extra property in the Json schema validating the
notebook.
strip_invalid_metadata : bool
Whether to strip metadata that does not exist in the Json schema when
validating the notebook.
Returns
-------
Expand All @@ -305,7 +309,7 @@ def normalize(
version_minor,
True,
relax_add_props=relax_add_props,
strip_invalid_metadata=False,
strip_invalid_metadata=strip_invalid_metadata,
)


Expand Down

0 comments on commit 85917af

Please sign in to comment.