Skip to content

Commit

Permalink
Act on F812 list comprehension redefines 'fmt'
Browse files Browse the repository at this point in the history
Specific to Python 2.7
  • Loading branch information
mwouts committed Jun 9, 2019
1 parent bb0ff6a commit 2e6e2c4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion jupytext/contentsmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def save(self, model, path=''):
jupytext_formats = long_form_multiple_formats(jupytext_formats, metadata)

# Set preferred formats if not format name is given yet
jupytext_formats = [preferred_format(fmt, self.preferred_jupytext_formats_save) for fmt in jupytext_formats]
jupytext_formats = [preferred_format(f, self.preferred_jupytext_formats_save) for f in jupytext_formats]

base, fmt = find_base_path_and_format(path, jupytext_formats)
self.update_paired_notebooks(path, fmt, jupytext_formats)
Expand Down
2 changes: 1 addition & 1 deletion jupytext/metadata_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def metadata_filter_as_dict(metadata_config):
if 'all' in metadata_config[section]:
metadata_config[section] = 'all'
else:
metadata_config[section] = [key for key in metadata_config[section] if key]
metadata_config[section] = [k for k in metadata_config[section] if k]

return metadata_config

Expand Down
2 changes: 1 addition & 1 deletion jupytext/paired_paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def paired_paths(main_path, fmt, formats):

# Is there a format that matches the main path?
base = base_path(main_path, fmt)
paths = [full_path(base, fmt) for fmt in formats]
paths = [full_path(base, f) for f in formats]

if main_path not in paths:
raise InconsistentPath(u"Paired paths '{}' do not include the current notebook path '{}'. "
Expand Down

0 comments on commit 2e6e2c4

Please sign in to comment.