From 733675a28235ec792fcb4c2ad83902fd421c6ca5 Mon Sep 17 00:00:00 2001 From: Marc Wouts Date: Thu, 25 Oct 2018 22:39:50 +0200 Subject: [PATCH] Allow blank spaces in jupytext.formats #105 --- jupytext/contentsmanager.py | 2 +- tests/test_contentsmanager.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jupytext/contentsmanager.py b/jupytext/contentsmanager.py index a488cca4e..f64ce5a0a 100644 --- a/jupytext/contentsmanager.py +++ b/jupytext/contentsmanager.py @@ -68,7 +68,7 @@ def check_formats(formats): for fmt in group: if not fmt: continue - fmt, _ = parse_one_format(fmt) + fmt, _ = parse_one_format(fmt.strip()) if not any([fmt.endswith(ext) for ext in allowed_extension]): raise ValueError('Group extension {} contains {}, which does not end with either {}.\n{}' .format(str(group), fmt, str(allowed_extension), expected_format)) diff --git a/tests/test_contentsmanager.py b/tests/test_contentsmanager.py index 6c88df4d8..1fe1dc926 100644 --- a/tests/test_contentsmanager.py +++ b/tests/test_contentsmanager.py @@ -548,7 +548,7 @@ def test_metadata_filter_is_effective(nb_file, tmpdir): cm.save(model=dict(type='notebook', content=nb), path=tmp_ipynb) # set config - cm.default_jupytext_formats = 'ipynb,py' + cm.default_jupytext_formats = 'ipynb, py' cm.default_notebook_metadata_filter = 'jupytext-all' cm.default_cell_metadata_filter = '-all'