Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean most flake8 unused import warnings. #718

Merged
merged 1 commit into from
Jul 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys
import os
import shlex
import shutil

# If extensions (or modules to document with autodoc) are in another directory,
Expand Down
3 changes: 1 addition & 2 deletions ipykernel/comm/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.

import sys
import logging

from traitlets.config import LoggingConfigurable

from traitlets.utils.importstring import import_item
from traitlets import Instance, Unicode, Dict, Any, default
from traitlets import Instance, Dict

from .comm import Comm

Expand Down
3 changes: 0 additions & 3 deletions ipykernel/connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
import json
import sys
from subprocess import Popen, PIPE
import warnings

from IPython.core.profiledir import ProfileDir
from IPython.paths import get_ipython_dir
from ipython_genutils.path import filefind

import jupyter_client
Expand Down
2 changes: 0 additions & 2 deletions ipykernel/debugger.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import logging
import os
import re

Expand All @@ -11,7 +10,6 @@
from .compiler import (get_file_name, get_tmp_directory, get_tmp_hash_seed)

from IPython.core.getipython import get_ipython
import debugpy

from .jsonutil import json_clean

Expand Down
2 changes: 0 additions & 2 deletions ipykernel/inprocess/channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

from jupyter_client.channelsabc import HBChannelABC

from .socket import DummySocket

#-----------------------------------------------------------------------------
# Channel classes
#-----------------------------------------------------------------------------
Expand Down
2 changes: 0 additions & 2 deletions ipykernel/inprocess/socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.

import abc
from queue import Queue
import warnings

import zmq

Expand Down
1 change: 0 additions & 1 deletion ipykernel/inprocess/tests/test_kernelmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import unittest

from ipykernel.inprocess.blocking import BlockingInProcessKernelClient
from ipykernel.inprocess.manager import InProcessKernelManager

#-----------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion ipykernel/jsonutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from datetime import datetime
import numbers

from ipython_genutils.encoding import DEFAULT_ENCODING
next_attr_name = '__next__'

#-----------------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion ipykernel/kernelapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from io import TextIOWrapper, FileIO
from logging import StreamHandler

import tornado
from tornado import ioloop

import zmq
Expand Down
2 changes: 1 addition & 1 deletion ipykernel/kernelbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
now = datetime.now

from tornado import ioloop
from tornado.queues import Queue, QueueEmpty
from tornado.queues import Queue
import zmq
from zmq.eventloop.zmqstream import ZMQStream

Expand Down
2 changes: 0 additions & 2 deletions ipykernel/log.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from logging import INFO, DEBUG, WARN, ERROR, FATAL

from zmq.log.handlers import PUBHandler

import warnings
Expand Down
2 changes: 1 addition & 1 deletion ipykernel/pickleutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from ipython_genutils.py3compat import buffer_to_bytes

# This registers a hook when it's imported
from ipyparallel.serialize import codeutil
from ipyparallel.serialize import codeutil # noqa F401

from traitlets.log import get_logger

Expand Down
2 changes: 1 addition & 1 deletion ipykernel/pylab/backend_inline.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import warnings

from matplotlib_inline.backend_inline import * # analysis: ignore
from matplotlib_inline.backend_inline import * # analysis: ignore # noqa F401


warnings.warn(
Expand Down
2 changes: 1 addition & 1 deletion ipykernel/pylab/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import warnings

from matplotlib_inline.config import * # analysis: ignore
from matplotlib_inline.config import * # analysis: ignore # noqa F401


warnings.warn(
Expand Down
2 changes: 1 addition & 1 deletion ipykernel/tests/test_pickleutil.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

import pickle

from ipykernel.pickleutil import can, uncan, codeutil
from ipykernel.pickleutil import can, uncan

def interactive(f):
f.__module__ = '__main__'
Expand Down
1 change: 0 additions & 1 deletion ipykernel/tests/test_zmq_shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.

import os
from queue import Queue
from threading import Thread
import unittest
Expand Down
3 changes: 1 addition & 2 deletions ipykernel/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
# Distributed under the terms of the Modified BSD License.

import atexit
import os
import sys
from time import time

from contextlib import contextmanager
from queue import Empty
from subprocess import PIPE, STDOUT
from subprocess import STDOUT

import nose

Expand Down