Skip to content

Commit 0c30a10

Browse files
author
Dorian Birraux
committed
code formating
1 parent 0e23ad5 commit 0c30a10

4 files changed

Lines changed: 11 additions & 5 deletions

File tree

wolframclient/evaluation/kernel/kernelcontroller.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,9 @@ def _new_running_event(self):
507507
Create a new event that triggers when the kernel process has terminated or when termination was requested.
508508
:return:
509509
"""
510-
return _ProcessAliveNotAbortedEvent(self.kernel_proc, self.trigger_termination_requested)
510+
return _ProcessAliveNotAbortedEvent(
511+
self.kernel_proc, self.trigger_termination_requested
512+
)
511513

512514
def _recv_check_process(self, copy=False):
513515
"""
@@ -517,7 +519,9 @@ def _recv_check_process(self, copy=False):
517519
:return:
518520
"""
519521
try:
520-
return self.kernel_socket_in.recv_abortable(copy=copy, abort_event=self._new_running_event())
522+
return self.kernel_socket_in.recv_abortable(
523+
copy=copy, abort_event=self._new_running_event()
524+
)
521525
except SocketAborted:
522526
logger.info("Kernel process is not running anymore.")
523527
raise WolframKernelException("Kernel is not running anymore.")
@@ -638,9 +642,10 @@ def __init__(self, subprocess, abort_event):
638642
def is_set(self):
639643
return self.subprocess.poll() is not None or self.abort_event.is_set()
640644

645+
641646
class _KernelProcessDied(object):
642647
def __init__(self, subprocess):
643648
self.subprocess = subprocess
644649

645650
def is_set(self):
646-
return self.subprocess.poll() is not None
651+
return self.subprocess.poll() is not None

wolframclient/tests/evaluation/test_coroutine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
import logging
44

5-
from wolframclient.exception import WolframKernelException
65
from wolframclient.deserializers import WXFConsumer, binary_deserialize
76
from wolframclient.evaluation import (
87
WolframCloudAsyncSession,
98
WolframEvaluatorPool,
109
WolframLanguageAsyncSession,
1110
parallel_evaluate,
1211
)
12+
from wolframclient.exception import WolframKernelException
1313
from wolframclient.language import wl, wlexpr
1414
from wolframclient.tests.configure import (
1515
kernel_path,

wolframclient/tests/evaluation/test_kernel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def test_kernel_abort_restart(self):
199199
try:
200200
session = WolframLanguageSession(kernel_path)
201201
session.start()
202-
start=time()
202+
start = time()
203203
future = session.evaluate_future("Pause[10]")
204204
with self.assertRaises(TimeoutError):
205205
future.result(timeout=1.0)

wolframclient/tests/externalevaluate/ev_loop.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from wolframclient.utils.externalevaluate import EXPORT_KWARGS, start_zmq_loop
1010
from wolframclient.utils.tests import TestCase as BaseTestCase
1111

12+
1213
class TestCase(BaseTestCase):
1314
def compare(self, string_version, result):
1415
self.assertEqual(string_version, export(result, **EXPORT_KWARGS))

0 commit comments

Comments
 (0)