Skip to content

Commit

Permalink
Fix unused variables and imports flagged by codeql scan
Browse files Browse the repository at this point in the history
  • Loading branch information
jasongrout committed Oct 30, 2020
1 parent 65e5607 commit 26067e7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
4 changes: 0 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys
import os
import shlex

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
Expand Down
4 changes: 2 additions & 2 deletions jupyter_core/tests/test_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@


def test_basic():
app = JupyterApp()
JupyterApp()


def test_default_traits():
app = JupyterApp()
for trait_name in app.traits():
value = getattr(app, trait_name)
getattr(app, trait_name)

class DummyApp(JupyterApp):
name = "dummy-app"
Expand Down
3 changes: 2 additions & 1 deletion jupyter_core/tests/test_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,12 @@ def test_subcommand_not_given():

def test_help():
output = get_jupyter_output('-h')
assert '--help' in output


def test_subcommand_not_found():
with pytest.raises(CalledProcessError):
output = get_jupyter_output('nonexistant-subcommand')
get_jupyter_output('nonexistant-subcommand')

@patch.object(sys, 'argv', [__file__] + sys.argv[1:])
def test_subcommand_list(tmpdir):
Expand Down
2 changes: 0 additions & 2 deletions jupyter_core/tests/test_migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@
import os
import re
import shutil
from subprocess import check_call
from tempfile import mkdtemp
from unittest.mock import patch

import pytest

from jupyter_core.utils import ensure_dir_exists

from jupyter_core.paths import jupyter_data_dir
from jupyter_core.migrate import (
migrate, migrate_one, migrate_config,
migrate_dir, migrate_file, migrate_static_custom,
Expand Down

0 comments on commit 26067e7

Please sign in to comment.