Skip to content

Commit bc2e787

Browse files
authored
Merge pull request #1251 from juhasch/fix_travis
Fix some travis warnings and errors
2 parents 96ab1d4 + f793a90 commit bc2e787

File tree

7 files changed

+15
-12
lines changed

7 files changed

+15
-12
lines changed

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
import os
1212

1313
from jupyter_contrib_core.testing_utils import get_logger
14-
from recommonmark.transform import AutoStructify
1514
from recommonmark.parser import CommonMarkParser
15+
from recommonmark.transform import AutoStructify
1616

1717
log = get_logger(name=os.path.basename(__file__), log_level=logging.INFO)
1818

src/jupyter_contrib_nbextensions/nbconvert_support/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
from .nbTranslate import NotebookLangExporter
1010
from .pp_highlighter import HighlighterPostProcessor, HighlighterPreprocessor
1111
from .pre_codefolding import CodeFoldingPreprocessor
12-
from .pre_pymarkdown import PyMarkdownPreprocessor
1312
from .pre_embedimages import EmbedImagesPreprocessor
13+
from .pre_pymarkdown import PyMarkdownPreprocessor
1414
from .pre_svg2pdf import SVG2PDFPreprocessor
1515
from .toc2 import TocExporter
1616

src/jupyter_contrib_nbextensions/nbextensions/code_prettify/README_isort.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ All options are provided by the [KerneExecOnCells library](kernel_exec_on_cell.j
3535

3636
Under the hood, this nbextension uses the [kerneexeconcells library](kernel_exec_on_cell.js), a shared library for creating Jupyter nbextensions which transform code cell text using calls to the active kernel.
3737

38-
See the [shared README](REAME.md) and [kerneexeconcells library](kernel_exec_on_cell.js) for the internal model used by the nbextension.
38+
See the [shared README](README.md) and [kerneexeconcells library](kernel_exec_on_cell.js) for the internal model used by the nbextension.
3939

4040
[fontawesome]: https://fontawesome.com/icons

src/jupyter_contrib_nbextensions/nbextensions/hide_input/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Exporting with nbconvert
1818
------------------------
1919

2020
See also the general docs for exporting using nbconvert at
21-
[jupyter-contrib-nbextensions.readthedocs.io](https://jupyter-contrib-nbextensions.readthedocs.io/en/latest).
21+
[jupyter-contrib-nbextensions.readthedocs.io](https://jupyter-contrib-nbextensions.readthedocs.io/en/latest/).
2222

2323
To export a notebook with hidden cell inputs using nbconvert, you need to use a
2424
custom template.

src/jupyter_contrib_nbextensions/nbextensions/varInspector/var_list.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@
33

44
from IPython import get_ipython
55
from IPython.core.magics.namespace import NamespaceMagics
6+
67
_nms = NamespaceMagics()
78
_Jupyter = get_ipython()
89
_nms.shell = _Jupyter.kernel.shell
910

1011
try:
11-
import numpy as np
12+
import numpy as np # noqa: F401
1213
except ImportError:
13-
pass
14+
pass
15+
1416

1517
def _getsizeof(x):
1618
# return the size of variable x. Amended version of sys.getsizeof
@@ -22,20 +24,22 @@ def _getsizeof(x):
2224
else:
2325
return getsizeof(x)
2426

27+
2528
def _getshapeof(x):
26-
#returns the shape of x if it has one
27-
#returns None otherwise - might want to return an empty string for an empty collum
29+
# returns the shape of x if it has one
30+
# returns None otherwise - might want to return an empty string for an empty collum
2831
try:
2932
return x.shape
30-
except AttributeError: #x does not have a shape
33+
except AttributeError: # x does not have a shape
3134
return None
3235

36+
3337
def var_dic_list():
3438
types_to_exclude = ['module', 'function', 'builtin_function_or_method',
3539
'instance', '_Feature', 'type', 'ufunc']
3640
values = _nms.who_ls()
3741
vardic = [{'varName': v, 'varType': type(eval(v)).__name__, 'varSize': str(_getsizeof(eval(v))), 'varShape': str(_getshapeof(eval(v))) if _getshapeof(eval(v)) else '', 'varContent': str(eval(v))[:200]} # noqa
38-
42+
3943
for v in values if (v not in ['_html', '_nms', 'NamespaceMagics', '_Jupyter']) & (type(eval(v)).__name__ not in types_to_exclude)] # noqa
4044
return json.dumps(vardic)
4145

tests/test_application.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727
from traitlets.tests.utils import check_help_all_output, check_help_output
2828

2929
import jupyter_contrib_nbextensions
30-
from jupyter_contrib_nbextensions.application import main as main_app
3130
from jupyter_contrib_nbextensions.application import (
3231
BaseContribNbextensionsApp, BaseContribNbextensionsInstallApp,
3332
ContribNbextensionsApp, InstallContribNbextensionsApp,
3433
UninstallContribNbextensionsApp,
3534
)
35+
from jupyter_contrib_nbextensions.application import main as main_app
3636
from jupyter_contrib_nbextensions.install import toggle_install
3737

3838
# attempt to use LibYaml if available

tests/test_preprocessors.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,4 +218,3 @@ def test_preprocessor_execute_time():
218218
_normalize_iso8601_timezone(etmd['end_time']),
219219
_normalize_iso8601_timezone(etmd['start_time']),
220220
'end_time should not be before start_time')
221-

0 commit comments

Comments
 (0)