diff --git a/examples/embedding/inprocess_qtconsole.py b/examples/embedding/inprocess_qtconsole.py index 7a976a319..f256ecfed 100644 --- a/examples/embedding/inprocess_qtconsole.py +++ b/examples/embedding/inprocess_qtconsole.py @@ -1,4 +1,5 @@ """An in-process qt console app.""" + import os import tornado diff --git a/examples/embedding/inprocess_terminal.py b/examples/embedding/inprocess_terminal.py index c951859e8..432991a7b 100644 --- a/examples/embedding/inprocess_terminal.py +++ b/examples/embedding/inprocess_terminal.py @@ -1,4 +1,5 @@ """An in-process terminal example.""" + import os from anyio import run diff --git a/examples/embedding/ipkernel_wxapp.py b/examples/embedding/ipkernel_wxapp.py index f24ed9392..b36fcc312 100755 --- a/examples/embedding/ipkernel_wxapp.py +++ b/examples/embedding/ipkernel_wxapp.py @@ -16,6 +16,7 @@ Ref: Modified from wxPython source code wxPython/samples/simple/simple.py """ + # ----------------------------------------------------------------------------- # Imports # ----------------------------------------------------------------------------- diff --git a/hatch_build.py b/hatch_build.py index 934348050..4dfdd1a22 100644 --- a/hatch_build.py +++ b/hatch_build.py @@ -1,4 +1,5 @@ """A custom hatch build hook for ipykernel.""" + import shutil import sys from pathlib import Path diff --git a/ipykernel/__main__.py b/ipykernel/__main__.py index a1050e32e..59c864405 100644 --- a/ipykernel/__main__.py +++ b/ipykernel/__main__.py @@ -1,4 +1,5 @@ """The cli entry point for ipykernel.""" + if __name__ == "__main__": from ipykernel import kernelapp as app diff --git a/ipykernel/compiler.py b/ipykernel/compiler.py index e42007ed6..6652e08ae 100644 --- a/ipykernel/compiler.py +++ b/ipykernel/compiler.py @@ -1,4 +1,5 @@ """Compiler helpers for the debugger.""" + import os import sys import tempfile diff --git a/ipykernel/connect.py b/ipykernel/connect.py index 117484599..1e1f16cdc 100644 --- a/ipykernel/connect.py +++ b/ipykernel/connect.py @@ -1,5 +1,5 @@ -"""Connection file-related utilities for the kernel -""" +"""Connection file-related utilities for the kernel""" + # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from __future__ import annotations diff --git a/ipykernel/datapub.py b/ipykernel/datapub.py index cc19696db..b0ab2c7b2 100644 --- a/ipykernel/datapub.py +++ b/ipykernel/datapub.py @@ -1,8 +1,7 @@ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. -"""Publishing native (typically pickled) objects. -""" +"""Publishing native (typically pickled) objects.""" import warnings diff --git a/ipykernel/debugger.py b/ipykernel/debugger.py index 780d18015..57804d2db 100644 --- a/ipykernel/debugger.py +++ b/ipykernel/debugger.py @@ -1,4 +1,5 @@ """Debugger implementation for the IPython kernel.""" + import os import re import sys diff --git a/ipykernel/embed.py b/ipykernel/embed.py index ad22e2a1e..8ef9c1848 100644 --- a/ipykernel/embed.py +++ b/ipykernel/embed.py @@ -1,5 +1,4 @@ -"""Simple function for embedding an IPython kernel -""" +"""Simple function for embedding an IPython kernel""" # ----------------------------------------------------------------------------- # Imports # ----------------------------------------------------------------------------- diff --git a/ipykernel/gui/gtk3embed.py b/ipykernel/gui/gtk3embed.py index 3317ecfe4..ab4ec2226 100644 --- a/ipykernel/gui/gtk3embed.py +++ b/ipykernel/gui/gtk3embed.py @@ -1,5 +1,4 @@ -"""GUI support for the IPython ZeroMQ kernel - GTK toolkit support. -""" +"""GUI support for the IPython ZeroMQ kernel - GTK toolkit support.""" # ----------------------------------------------------------------------------- # Copyright (C) 2010-2011 The IPython Development Team # diff --git a/ipykernel/gui/gtkembed.py b/ipykernel/gui/gtkembed.py index e87249ead..6f3b6d166 100644 --- a/ipykernel/gui/gtkembed.py +++ b/ipykernel/gui/gtkembed.py @@ -1,5 +1,4 @@ -"""GUI support for the IPython ZeroMQ kernel - GTK toolkit support. -""" +"""GUI support for the IPython ZeroMQ kernel - GTK toolkit support.""" # ----------------------------------------------------------------------------- # Copyright (C) 2010-2011 The IPython Development Team # diff --git a/ipykernel/heartbeat.py b/ipykernel/heartbeat.py index 9816959dd..7706312e1 100644 --- a/ipykernel/heartbeat.py +++ b/ipykernel/heartbeat.py @@ -1,5 +1,4 @@ -"""The client and server for a basic ping-pong style heartbeat. -""" +"""The client and server for a basic ping-pong style heartbeat.""" # ----------------------------------------------------------------------------- # Copyright (C) 2008-2011 The IPython Development Team diff --git a/ipykernel/inprocess/blocking.py b/ipykernel/inprocess/blocking.py index b5c421a79..4069d37c2 100644 --- a/ipykernel/inprocess/blocking.py +++ b/ipykernel/inprocess/blocking.py @@ -1,7 +1,8 @@ -""" Implements a fully blocking kernel client. +"""Implements a fully blocking kernel client. Useful for test suites and blocking terminal interfaces. """ + import sys # ----------------------------------------------------------------------------- diff --git a/ipykernel/inprocess/client.py b/ipykernel/inprocess/client.py index 8ca97470f..46fcd42e0 100644 --- a/ipykernel/inprocess/client.py +++ b/ipykernel/inprocess/client.py @@ -11,7 +11,6 @@ # Imports # ----------------------------------------------------------------------------- - from jupyter_client.client import KernelClient from jupyter_client.clientabc import KernelClientABC diff --git a/ipykernel/inprocess/constants.py b/ipykernel/inprocess/constants.py index 6133c757d..16d572083 100644 --- a/ipykernel/inprocess/constants.py +++ b/ipykernel/inprocess/constants.py @@ -1,5 +1,4 @@ -"""Shared constants. -""" +"""Shared constants.""" # Because inprocess communication is not networked, we can use a common Session # key everywhere. This is not just the empty bytestring to avoid tripping diff --git a/ipykernel/inprocess/socket.py b/ipykernel/inprocess/socket.py index 5a2e0008b..05b45687c 100644 --- a/ipykernel/inprocess/socket.py +++ b/ipykernel/inprocess/socket.py @@ -1,4 +1,4 @@ -""" Defines a dummy socket implementing (part of) the zmq.Socket interface. """ +"""Defines a dummy socket implementing (part of) the zmq.Socket interface.""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. diff --git a/ipykernel/log.py b/ipykernel/log.py index bbd4c445b..91a4e114e 100644 --- a/ipykernel/log.py +++ b/ipykernel/log.py @@ -1,4 +1,5 @@ """A PUB log handler.""" + import warnings from zmq.log.handlers import PUBHandler diff --git a/ipykernel/shellchannel.py b/ipykernel/shellchannel.py index bc0459c46..10abdb359 100644 --- a/ipykernel/shellchannel.py +++ b/ipykernel/shellchannel.py @@ -1,4 +1,5 @@ """A thread for a shell channel.""" + import zmq.asyncio from .subshell_manager import SubshellManager diff --git a/ipykernel/trio_runner.py b/ipykernel/trio_runner.py index a641feba8..6fb44107b 100644 --- a/ipykernel/trio_runner.py +++ b/ipykernel/trio_runner.py @@ -1,4 +1,5 @@ """A trio loop runner.""" + import builtins import logging import signal diff --git a/tests/test_zmq_shell.py b/tests/test_zmq_shell.py index dfd22dec0..8a8fe042b 100644 --- a/tests/test_zmq_shell.py +++ b/tests/test_zmq_shell.py @@ -1,4 +1,4 @@ -""" Tests for zmq shell / display publisher. """ +"""Tests for zmq shell / display publisher.""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License.