From 74be4664186312e65a6fa0b7c4f5c5388b845c65 Mon Sep 17 00:00:00 2001 From: Josh Barnes Date: Sun, 3 Sep 2017 22:06:34 +0000 Subject: [PATCH] fix linting again... --- .../nbconvert_support/pre_codefolding.py | 4 ++-- tests/test_preprocessors.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/jupyter_contrib_nbextensions/nbconvert_support/pre_codefolding.py b/src/jupyter_contrib_nbextensions/nbconvert_support/pre_codefolding.py index 5a064a9..4af05a2 100644 --- a/src/jupyter_contrib_nbextensions/nbconvert_support/pre_codefolding.py +++ b/src/jupyter_contrib_nbextensions/nbconvert_support/pre_codefolding.py @@ -43,7 +43,7 @@ class CodeFoldingPreprocessor(Preprocessor): if not lines: # no lines -> return return cell - if folded[0] == 0 and lines[0].startswith(('#','%')): + if folded[0] == 0 and lines[0].startswith(('#', '%')): # fold whole cell when first line is a comment or magic self.log.debug("fold whole cell") return lines[0].rstrip('\n') + self.fold_mark + '\n' @@ -86,7 +86,7 @@ class CodeFoldingPreprocessor(Preprocessor): skipped += line self.log.debug("%02i, %02i < %02i, %i,'%s' ", i, indent, - foldIndent, fold, line[0:indent+10].strip("\r\n")) + foldIndent, fold, line[0:indent + 10].strip("\r\n")) return fcell diff --git a/tests/test_preprocessors.py b/tests/test_preprocessors.py index a2c7cb7..4bfadd8 100644 --- a/tests/test_preprocessors.py +++ b/tests/test_preprocessors.py @@ -83,6 +83,7 @@ def test_preprocessor_codefolding(): assert_in('GR4CX32ZR', body, 'check if fold has worked') assert_not_in('GR4CX32ZE', body, 'check if fold has worked') + def test_preprocessor_svg2pdf(): """Test svg2pdf preprocessor for markdown cell svg images in latex/pdf.""" # check import shortcut