Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 18, 2024
1 parent 7444b11 commit 1fac804
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nbformat/v4/rwbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
from __future__ import annotations

from collections.abc import Mapping


Expand Down Expand Up @@ -101,7 +102,7 @@ def strip_transient(nb):
# Handle malformed notebooks where metadata was incorrectly set as a non-dictionary type
if not isinstance(nb.metadata, Mapping):
nb.metadata = dict()

nb.metadata.pop("orig_nbformat", None)
nb.metadata.pop("orig_nbformat_minor", None)
nb.metadata.pop("signature", None)
Expand Down

0 comments on commit 1fac804

Please sign in to comment.