Skip to content

Commit b7783dd

Browse files
authored
Merge pull request #827 from penguinolog/py2_artifacts
2 parents 2c9b6ff + 9efccb7 commit b7783dd

30 files changed

+78
-81
lines changed

examples/embedding/internal_ipkernel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def mpl_kernel(gui):
2020
return kernel
2121

2222

23-
class InternalIPKernel(object):
23+
class InternalIPKernel:
2424

2525
def init_ipkernel(self, backend):
2626
# Start IPython kernel with GUI event loop and mpl support

ipykernel/comm/comm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def _default_topic(self):
5050
def __init__(self, target_name='', data=None, metadata=None, buffers=None, **kwargs):
5151
if target_name:
5252
kwargs['target_name'] = target_name
53-
super(Comm, self).__init__(**kwargs)
53+
super().__init__(**kwargs)
5454
if self.kernel:
5555
if self.primary:
5656
# I am primary, open my peer.

ipykernel/compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def get_file_name(code):
5959
class XCachingCompiler(CachingCompiler):
6060

6161
def __init__(self, *args, **kwargs):
62-
super(XCachingCompiler, self).__init__(*args, **kwargs)
62+
super().__init__(*args, **kwargs)
6363
self.log = None
6464

6565
def get_code_name(self, raw_code, code, number):

ipykernel/debugger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ async def richInspectVariables(self, message):
540540
else:
541541
# The code has stopped on a breakpoint, we use the setExpression
542542
# request to get the rich representation of the variable
543-
code = "get_ipython().display_formatter.format(" + var_name + ")"
543+
code = f"get_ipython().display_formatter.format({var_name})"
544544
frame_id = message["arguments"]["frameId"]
545545
seq = message["seq"]
546546
reply = await self._forward_message(

ipykernel/displayhook.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from jupyter_client.session import extract_header, Session
1313

1414

15-
class ZMQDisplayHook(object):
15+
class ZMQDisplayHook:
1616
"""A simple displayhook that publishes the object's repr over a ZeroMQ
1717
socket."""
1818
topic = b'execute_result'

ipykernel/eventloops.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def loop_tk(kernel):
229229
# file handlers are not available on Windows
230230
if hasattr(app, 'createfilehandler'):
231231
# A basic wrapper for structural similarity with the Windows version
232-
class BasicAppWrapper(object):
232+
class BasicAppWrapper:
233233
def __init__(self, app):
234234
self.app = app
235235
self.app.withdraw()
@@ -257,7 +257,7 @@ def process_stream_events(stream, *a, **kw):
257257
# Tk uses milliseconds
258258
poll_interval = int(1000 * kernel._poll_interval)
259259

260-
class TimedAppWrapper(object):
260+
class TimedAppWrapper:
261261
def __init__(self, app, func):
262262
self.app = app
263263
self.app.withdraw()

ipykernel/gui/gtk3embed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# Classes and functions
2424
#-----------------------------------------------------------------------------
2525

26-
class GTKEmbed(object):
26+
class GTKEmbed:
2727
"""A class to embed a kernel into the GTK main event loop.
2828
"""
2929
def __init__(self, kernel):

ipykernel/gui/gtkembed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# Classes and functions
2222
#-----------------------------------------------------------------------------
2323

24-
class GTKEmbed(object):
24+
class GTKEmbed:
2525
"""A class to embed a kernel into the GTK main event loop.
2626
"""
2727
def __init__(self, kernel):

ipykernel/inprocess/blocking.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
class BlockingInProcessChannel(InProcessChannel):
2424

2525
def __init__(self, *args, **kwds):
26-
super(BlockingInProcessChannel, self).__init__(*args, **kwds)
26+
super().__init__(*args, **kwds)
2727
self._in_queue = Queue()
2828

2929
def call_handlers(self, msg):

ipykernel/inprocess/channels.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
# Channel classes
1010
#-----------------------------------------------------------------------------
1111

12-
class InProcessChannel(object):
12+
class InProcessChannel:
1313
"""Base class for in-process channels."""
1414
proxy_methods = []
1515

1616
def __init__(self, client=None):
17-
super(InProcessChannel, self).__init__()
17+
super().__init__()
1818
self.client = client
1919
self._is_alive = False
2020

@@ -57,7 +57,7 @@ def process_events(self):
5757

5858

5959

60-
class InProcessHBChannel(object):
60+
class InProcessHBChannel:
6161
"""A dummy heartbeat channel interface for in-process kernels.
6262
6363
Normally we use the heartbeat to check that the kernel process is alive.
@@ -68,7 +68,7 @@ class InProcessHBChannel(object):
6868
time_to_dead = 3.0
6969

7070
def __init__(self, client=None):
71-
super(InProcessHBChannel, self).__init__()
71+
super().__init__()
7272
self.client = client
7373
self._is_alive = False
7474
self._pause = True

0 commit comments

Comments
 (0)