Skip to content

Commit

Permalink
jupytext metadata should not be compared
Browse files Browse the repository at this point in the history
  • Loading branch information
mwouts committed Oct 23, 2018
1 parent c4845b2 commit dceade8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions jupytext/compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ def filtered_cell(cell, preserve_outputs, cell_metadata_filter):
def filtered_notebook_metadata(notebook):
"""Notebook metadata, filtered for metadata added by Jupytext itself"""
metadata = copy(notebook.metadata)
return filter_metadata(metadata,
notebook.metadata.get('jupytext', {}).get('metadata_filter', {}).get('notebook'),
_DEFAULT_NOTEBOOK_METADATA.replace('jupytext,', ''))
metadata = filter_metadata(metadata,
notebook.metadata.get('jupytext', {}).get('metadata_filter', {}).get('notebook'),
_DEFAULT_NOTEBOOK_METADATA)
if 'jupytext' in metadata:
del metadata['jupytext']
return metadata


class NotebookDifference(Exception):
Expand Down

0 comments on commit dceade8

Please sign in to comment.