mirror of
https://github.com/wassname/jupyter_contrib_nbextensions.git
synced 2026-06-27 16:10:24 +08:00
fix linting again...
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user