Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c54a223

Browse files
committed
reformat
1 parent 72a79cb commit c54a223

4 files changed

Lines changed: 17 additions & 13 deletions

File tree

IPython/core/pylabtools.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@
4343
backend2gui['Qt4Agg'] = 'qt'
4444
# In the reverse mapping, there are a few extra valid matplotlib backends that
4545
# map to the same GUI support
46-
backend2gui['GTK'] = backend2gui['GTKCairo'] = 'gtk'
47-
backend2gui['GTK3Cairo'] = 'gtk3'
48-
backend2gui['GTK4Cairo'] = 'gtk4'
49-
backend2gui['WX'] = 'wx'
50-
backend2gui['CocoaAgg'] = 'osx'
46+
backend2gui["GTK"] = backend2gui["GTKCairo"] = "gtk"
47+
backend2gui["GTK3Cairo"] = "gtk3"
48+
backend2gui["GTK4Cairo"] = "gtk4"
49+
backend2gui["WX"] = "wx"
50+
backend2gui["CocoaAgg"] = "osx"
5151
# And some backends that don't need GUI integration
5252
del backend2gui["nbAgg"]
5353
del backend2gui["agg"]

IPython/lib/inputhookgtk4.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
"""
22
Enable Gtk4 to be used interactively by IPython.
33
"""
4-
#-----------------------------------------------------------------------------
4+
# -----------------------------------------------------------------------------
55
# Copyright (c) 2021, the IPython Development Team.
66
#
77
# Distributed under the terms of the Modified BSD License.
88
#
99
# The full license is in the file COPYING.txt, distributed with this software.
10-
#-----------------------------------------------------------------------------
10+
# -----------------------------------------------------------------------------
1111

12-
#-----------------------------------------------------------------------------
12+
# -----------------------------------------------------------------------------
1313
# Imports
14-
#-----------------------------------------------------------------------------
14+
# -----------------------------------------------------------------------------
1515

1616
import sys
1717

1818
from gi.repository import GLib
1919

20-
#-----------------------------------------------------------------------------
20+
# -----------------------------------------------------------------------------
2121
# Code
22-
#-----------------------------------------------------------------------------
22+
# -----------------------------------------------------------------------------
23+
2324

2425
class _InputHook:
2526
def __init__(self, context):

IPython/terminal/pt_inputhooks/gtk4.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
class _InputHook:
99
def __init__(self, context):
1010
self._quit = False
11-
GLib.io_add_watch(context.fileno(), GLib.PRIORITY_DEFAULT, GLib.IO_IN, self.quit)
11+
GLib.io_add_watch(
12+
context.fileno(), GLib.PRIORITY_DEFAULT, GLib.IO_IN, self.quit
13+
)
1214

1315
def quit(self, *args, **kwargs):
1416
self._quit = True

examples/IPython Kernel/gui/gui-gtk4.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"""
1010

1111
import gi
12-
gi.require_version('Gtk', '4.0')
12+
13+
gi.require_version("Gtk", "4.0")
1314
from gi.repository import Gtk, GLib # noqa
1415

1516

0 commit comments

Comments
 (0)