Show More
@@ -28,7 +28,7 b' jobs:' | |||||
28 | - name: Install dependencies |
|
28 | - name: Install dependencies | |
29 | run: | |
|
29 | run: | | |
30 | python -m pip install --upgrade pip |
|
30 | python -m pip install --upgrade pip | |
31 |
pip install darker black==2 |
|
31 | pip install darker==1.5.1 black==22.10.0 | |
32 | - name: Lint with darker |
|
32 | - name: Lint with darker | |
33 | run: | |
|
33 | run: | | |
34 | darker -r 60625f241f298b5039cb2debc365db38aa7bb522 --check --diff . || ( |
|
34 | darker -r 60625f241f298b5039cb2debc365db38aa7bb522 --check --diff . || ( |
@@ -226,14 +226,17 b' class ExecutionInfo(object):' | |||||
226 | raw_cell = ( |
|
226 | raw_cell = ( | |
227 | (self.raw_cell[:50] + "..") if len(self.raw_cell) > 50 else self.raw_cell |
|
227 | (self.raw_cell[:50] + "..") if len(self.raw_cell) > 50 else self.raw_cell | |
228 | ) |
|
228 | ) | |
229 | return '<%s object at %x, raw_cell="%s" store_history=%s silent=%s shell_futures=%s cell_id=%s>' % ( |
|
229 | return ( | |
230 | name, |
|
230 | '<%s object at %x, raw_cell="%s" store_history=%s silent=%s shell_futures=%s cell_id=%s>' | |
231 |
|
|
231 | % ( | |
232 |
|
|
232 | name, | |
233 |
self |
|
233 | id(self), | |
234 |
|
|
234 | raw_cell, | |
235 |
self.s |
|
235 | self.store_history, | |
236 |
self. |
|
236 | self.silent, | |
|
237 | self.shell_futures, | |||
|
238 | self.cell_id, | |||
|
239 | ) | |||
237 | ) |
|
240 | ) | |
238 |
|
241 | |||
239 |
|
242 |
@@ -36,7 +36,7 b' version_info = (_version_major, _version_minor, _version_patch, _version_extra)' | |||||
36 | kernel_protocol_version_info = (5, 0) |
|
36 | kernel_protocol_version_info = (5, 0) | |
37 | kernel_protocol_version = "%i.%i" % kernel_protocol_version_info |
|
37 | kernel_protocol_version = "%i.%i" % kernel_protocol_version_info | |
38 |
|
38 | |||
39 |
license = |
|
39 | license = "BSD-3-Clause" | |
40 |
|
40 | |||
41 | authors = {'Fernando' : ('Fernando Perez','fperez.net@gmail.com'), |
|
41 | authors = {'Fernando' : ('Fernando Perez','fperez.net@gmail.com'), | |
42 | 'Janko' : ('Janko Hauser','jhauser@zscout.de'), |
|
42 | 'Janko' : ('Janko Hauser','jhauser@zscout.de'), |
@@ -1,4 +1,4 b'' | |||||
1 | # coding: iso-8859-5 |
|
1 | # coding: iso-8859-5 | |
2 | # (Unlikely to be the default encoding for most testers.) |
|
2 | # (Unlikely to be the default encoding for most testers.) | |
3 | # ������������������� <- Cyrillic characters |
|
3 | # ������������������� <- Cyrillic characters | |
4 |
u = |
|
4 | u = "����" |
@@ -1,11 +1,14 b'' | |||||
1 | # encoding: utf-8 |
|
1 | # encoding: utf-8 | |
2 | from IPython.testing import decorators as dec |
|
2 | from IPython.testing import decorators as dec | |
3 |
|
3 | |||
|
4 | ||||
4 | def test_import_backgroundjobs(): |
|
5 | def test_import_backgroundjobs(): | |
5 | from IPython.lib import backgroundjobs |
|
6 | from IPython.lib import backgroundjobs | |
6 |
|
7 | |||
|
8 | ||||
7 | def test_import_deepreload(): |
|
9 | def test_import_deepreload(): | |
8 | from IPython.lib import deepreload |
|
10 | from IPython.lib import deepreload | |
9 |
|
11 | |||
|
12 | ||||
10 | def test_import_demo(): |
|
13 | def test_import_demo(): | |
11 | from IPython.lib import demo |
|
14 | from IPython.lib import demo |
@@ -31,8 +31,7 b' from prompt_toolkit import __version__ as ptk_version' | |||||
31 |
|
31 | |||
32 | from IPython.core.async_helpers import get_asyncio_loop |
|
32 | from IPython.core.async_helpers import get_asyncio_loop | |
33 |
|
33 | |||
34 |
PTK3 = ptk_version.startswith( |
|
34 | PTK3 = ptk_version.startswith("3.") | |
35 |
|
||||
36 |
|
35 | |||
37 |
|
36 | |||
38 | def inputhook(context): |
|
37 | def inputhook(context): |
@@ -41,6 +41,7 b' import gtk, gobject' | |||||
41 | # Enable threading in GTK. (Otherwise, GTK will keep the GIL.) |
|
41 | # Enable threading in GTK. (Otherwise, GTK will keep the GIL.) | |
42 | gtk.gdk.threads_init() |
|
42 | gtk.gdk.threads_init() | |
43 |
|
43 | |||
|
44 | ||||
44 | def inputhook(context): |
|
45 | def inputhook(context): | |
45 | """ |
|
46 | """ | |
46 | When the eventloop of prompt-toolkit is idle, call this inputhook. |
|
47 | When the eventloop of prompt-toolkit is idle, call this inputhook. | |
@@ -50,6 +51,7 b' def inputhook(context):' | |||||
50 |
|
51 | |||
51 | :param context: An `InputHookContext` instance. |
|
52 | :param context: An `InputHookContext` instance. | |
52 | """ |
|
53 | """ | |
|
54 | ||||
53 | def _main_quit(*a, **kw): |
|
55 | def _main_quit(*a, **kw): | |
54 | gtk.main_quit() |
|
56 | gtk.main_quit() | |
55 | return False |
|
57 | return False |
@@ -3,10 +3,12 b'' | |||||
3 |
|
3 | |||
4 | from gi.repository import Gtk, GLib |
|
4 | from gi.repository import Gtk, GLib | |
5 |
|
5 | |||
|
6 | ||||
6 | def _main_quit(*args, **kwargs): |
|
7 | def _main_quit(*args, **kwargs): | |
7 | Gtk.main_quit() |
|
8 | Gtk.main_quit() | |
8 | return False |
|
9 | return False | |
9 |
|
10 | |||
|
11 | ||||
10 | def inputhook(context): |
|
12 | def inputhook(context): | |
11 | GLib.io_add_watch(context.fileno(), GLib.PRIORITY_DEFAULT, GLib.IO_IN, _main_quit) |
|
13 | GLib.io_add_watch(context.fileno(), GLib.PRIORITY_DEFAULT, GLib.IO_IN, _main_quit) | |
12 | Gtk.main() |
|
14 | Gtk.main() |
@@ -782,7 +782,7 b' def _init_checker_class() -> Type["IPDoctestOutputChecker"]:' | |||||
782 | precision = 0 if fraction is None else len(fraction) |
|
782 | precision = 0 if fraction is None else len(fraction) | |
783 | if exponent is not None: |
|
783 | if exponent is not None: | |
784 | precision -= int(exponent) |
|
784 | precision -= int(exponent) | |
785 |
if float(w.group()) == approx(float(g.group()), abs=10 |
|
785 | if float(w.group()) == approx(float(g.group()), abs=10**-precision): | |
786 | # They're close enough. Replace the text we actually |
|
786 | # They're close enough. Replace the text we actually | |
787 | # got with the text we want, so that it will match when we |
|
787 | # got with the text we want, so that it will match when we | |
788 | # check the string literally. |
|
788 | # check the string literally. |
@@ -19,7 +19,6 b' def test_base():' | |||||
19 |
|
19 | |||
20 |
|
20 | |||
21 | def test_SubClass(): |
|
21 | def test_SubClass(): | |
22 |
|
||||
23 | class SubClass(Base): |
|
22 | class SubClass(Base): | |
24 | y = 2 |
|
23 | y = 2 | |
25 |
|
24 | |||
@@ -53,7 +52,7 b' def test_misbehaving_object_without_trait_names():' | |||||
53 |
|
52 | |||
54 | class SillierWithDir(MisbehavingGetattr): |
|
53 | class SillierWithDir(MisbehavingGetattr): | |
55 | def __dir__(self): |
|
54 | def __dir__(self): | |
56 |
return [ |
|
55 | return ["some_method"] | |
57 |
|
56 | |||
58 | for bad_klass in (MisbehavingGetattr, SillierWithDir): |
|
57 | for bad_klass in (MisbehavingGetattr, SillierWithDir): | |
59 | obj = bad_klass() |
|
58 | obj = bad_klass() |
@@ -346,7 +346,7 b' def git_prebuild(pkg_dir, build_cmd=build_py):' | |||||
346 | out_file.writelines( |
|
346 | out_file.writelines( | |
347 | [ |
|
347 | [ | |
348 | "# GENERATED BY setup.py\n", |
|
348 | "# GENERATED BY setup.py\n", | |
349 |
'commit = |
|
349 | 'commit = "%s"\n' % repo_commit, | |
350 | ] |
|
350 | ] | |
351 | ) |
|
351 | ) | |
352 |
|
352 |
General Comments 0
You need to be logged in to leave comments.
Login now