From ac93fc33a76f615e0b1e980650e984a156dfea61 Mon Sep 17 00:00:00 2001 From: Josh Barnes Date: Wed, 28 Dec 2016 11:44:36 +0000 Subject: [PATCH] [ci] specify noqa comments --- setup.py | 10 +++++----- src/jupyter_contrib_nbextensions/migrate.py | 4 ++-- tests/test_migrate.py | 2 +- tests/test_preprocessors.py | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/setup.py b/setup.py index 0e67548..0d34e58 100755 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ officially related to the Jupyter development team. The maturity of the provided extensions varies, so please check `the repository issues page `_ if you encounter any problems, and create a new issue if needed! -""", # noqa +""", # noqa: E501 version='0.2.3', author='ipython-contrib and jupyter-contrib developers', author_email='jupytercontrib@gmail.com', @@ -90,14 +90,14 @@ if you encounter any problems, and create a new issue if needed! zip_safe=False, entry_points={ 'console_scripts': [ - 'jupyter-contrib-nbextension = jupyter_contrib_nbextensions.application:main', # noqa + 'jupyter-contrib-nbextension = jupyter_contrib_nbextensions.application:main', # noqa: E501 ], 'jupyter_contrib_core.app.subcommands': [ - 'nbextension = jupyter_contrib_nbextensions.application:jupyter_contrib_core_app_subcommands', # noqa + 'nbextension = jupyter_contrib_nbextensions.application:jupyter_contrib_core_app_subcommands', # noqa: E501 ], 'nbconvert.exporters': [ - 'html_toc = jupyter_contrib_nbextensions.nbconvert_support.toc2:TocExporter', # noqa - 'html_embed = jupyter_contrib_nbextensions.nbconvert_support.embedhtml:EmbedHTMLExporter', # noqa + 'html_toc = jupyter_contrib_nbextensions.nbconvert_support.toc2:TocExporter', # noqa: E501 + 'html_embed = jupyter_contrib_nbextensions.nbconvert_support.embedhtml:EmbedHTMLExporter', # noqa: E501 ], }, scripts=[os.path.join('scripts', p) for p in [ diff --git a/src/jupyter_contrib_nbextensions/migrate.py b/src/jupyter_contrib_nbextensions/migrate.py index d1d55ca..d7ee79f 100644 --- a/src/jupyter_contrib_nbextensions/migrate.py +++ b/src/jupyter_contrib_nbextensions/migrate.py @@ -28,7 +28,7 @@ def _migrate_require_paths(logger=None): mappings = { 'notebook': [ - ('config/config_menu/main', 'nbextensions_configurator/config_menu/main'), # noqa + ('config/config_menu/main', 'nbextensions_configurator/config_menu/main'), # noqa: E501 ('yapf_ext/yapf_ext', 'code_prettify/code_prettify'), ] + [(req, req.split('/', 1)[1]) for req in [ 'codemirrormode/skill/skill', @@ -138,7 +138,7 @@ def _uninstall_pre_config(logger=None): old_postproc_classes = [ 'post_embedhtml.EmbedPostProcessor', 'jupyter_contrib_nbextensions.nbconvert_support.EmbedPostProcessor', - 'jupyter_contrib_nbextensions.nbconvert_support.post_embedhtml.EmbedPostProcessor', # noqa + 'jupyter_contrib_nbextensions.nbconvert_support.post_embedhtml.EmbedPostProcessor', # noqa: E501 ] if section.get('postprocessor_class') in old_postproc_classes: section.pop('postprocessor_class', None) diff --git a/tests/test_migrate.py b/tests/test_migrate.py index 2a1d286..1c1007e 100644 --- a/tests/test_migrate.py +++ b/tests/test_migrate.py @@ -148,7 +148,7 @@ class MigrateTest(TestCase): """Check migrate application removes old install correctly.""" installed_files = self.install_old_pkg() # execute the migrate app - klass = jupyter_contrib_nbextensions.application.MigrateContribNbextensionsApp # noqa + klass = jupyter_contrib_nbextensions.application.MigrateContribNbextensionsApp # noqa: E501 patch_traitlets_app_logs(klass) jupyter_contrib_nbextensions.application.main(['migrate']) self.check_old_pkg_uninstalled(installed_files) diff --git a/tests/test_preprocessors.py b/tests/test_preprocessors.py index 3e52145..9508192 100644 --- a/tests/test_preprocessors.py +++ b/tests/test_preprocessors.py @@ -34,7 +34,7 @@ def export_through_preprocessor( def test_preprocessor_pymarkdown(): """Test python markdown preprocessor.""" # check import shortcut - from jupyter_contrib_nbextensions.nbconvert_support import PyMarkdownPreprocessor # noqa + from jupyter_contrib_nbextensions.nbconvert_support import PyMarkdownPreprocessor # noqa E501 notebook_node = nbf.new_notebook(cells=[ nbf.new_code_cell(source="a = 'world'"), nbf.new_markdown_cell(source="Hello {{ a }}", @@ -49,7 +49,7 @@ def test_preprocessor_pymarkdown(): def test_preprocessor_codefolding(): """Test codefolding preprocessor.""" # check import shortcut - from jupyter_contrib_nbextensions.nbconvert_support import CodeFoldingPreprocessor # noqa + from jupyter_contrib_nbextensions.nbconvert_support import CodeFoldingPreprocessor # noqa: E501 notebook_node = nbf.new_notebook(cells=[ nbf.new_code_cell(source='\n'.join(["# Codefolding test 1", "'AXYZ12AXY'"]), @@ -70,7 +70,7 @@ def test_preprocessor_codefolding(): def test_preprocessor_svg2pdf(): """Test svg2pdf preprocessor for markdown cell svg images in latex/pdf.""" # check import shortcut - from jupyter_contrib_nbextensions.nbconvert_support import SVG2PDFPreprocessor # noqa + from jupyter_contrib_nbextensions.nbconvert_support import SVG2PDFPreprocessor # noqa: E501 from jupyter_contrib_nbextensions.nbconvert_support.pre_svg2pdf import ( get_inkscape_executable_path) if not get_inkscape_executable_path(): @@ -95,7 +95,7 @@ def test_preprocessor_svg2pdf(): def test_preprocessor_collapsible_headings(): """Test collapsible_headings preprocessor.""" # check import shortcut - from jupyter_contrib_nbextensions.nbconvert_support import CollapsibleHeadingsPreprocessor # noqa + from jupyter_contrib_nbextensions.nbconvert_support import CollapsibleHeadingsPreprocessor # noqa: E501 cells = [] for lvl in range(6, 1, -1): for collapsed in (True, False):