Skip to content

Commit cb3d2e8

Browse files
committed
code lint
1 parent f5c7474 commit cb3d2e8

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

wolframclient/cli/commands/start_externalevaluate.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ def add_arguments(self, parser):
1919

2020
def handle(self, port=None, installpath=None, kernelversion=None, **opts):
2121

22-
for key, value in (("WOLFRAM_INSTALLATION_DIRECTORY", installpath), ("WOLFRAM_KERNEL_VERSION", kernelversion)):
22+
for key, value in (
23+
("WOLFRAM_INSTALLATION_DIRECTORY", installpath),
24+
("WOLFRAM_KERNEL_VERSION", kernelversion),
25+
):
2326
if value:
2427
os.environ[key] = value
2528

wolframclient/evaluation/kernel/kernelcontroller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ def _kernel_start(self):
389389
cmd = [self.kernel, "-noprompt"]
390390

391391
for path in self.initfile:
392-
cmd.append('-initfile')
392+
cmd.append("-initfile")
393393
cmd.append(path)
394394

395395
if self.loglevel != logging.NOTSET:

wolframclient/serializers/base.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@
1515
from wolframclient.utils.encoding import concatenate_bytes, force_text
1616
from wolframclient.utils.functional import first
1717

18-
if hasattr(inspect, 'getfullargspec'):
18+
if hasattr(inspect, "getfullargspec"):
1919
inspect_args = inspect.getfullargspec
20-
elif hasattr(inspect, 'getargspec'):
20+
elif hasattr(inspect, "getargspec"):
2121
inspect_args = inspect.getargspec
2222
else:
23+
2324
def inspect_args(f):
2425
raise TypeError()
2526

wolframclient/serializers/encoder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
from collections import defaultdict
66
from functools import partial
77

8-
from wolframclient.utils.environment import installation_version
98
from wolframclient.serializers.utils import safe_len
109
from wolframclient.utils.api import multiprocessing, pkg_resources
1110
from wolframclient.utils.dispatch import Dispatch
11+
from wolframclient.utils.environment import installation_version
1212
from wolframclient.utils.functional import composition, is_iterable, iterate, map
1313
from wolframclient.utils.importutils import safe_import_string
1414

wolframclient/tests/externalevaluate/ev_loop.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from threading import Thread
44

55
import zmq
6-
76
from wolframclient.language import wl
87
from wolframclient.serializers import export
98
from wolframclient.utils.externalevaluate import EXPORT_KWARGS, start_zmq_loop

wolframclient/tests/serializers/wxf_numpy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def test_scalars(self):
228228
for arr, result in (
229229
(numpy.array(1, dtype=numpy.int8), b"1"),
230230
(numpy.array(0.5, dtype=numpy.float32), b"0.5"),
231-
):
231+
):
232232
self.assertEqual(export(arr), result)
233233

234234
def test_bad_options(self):

wolframclient/utils/environment.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,16 @@
33
from wolframclient.utils import six
44
from wolframclient.utils.api import os
55

6-
from wolframclient.utils import six
7-
from wolframclient.utils.api import os
86

97
def installation_version():
108

11-
v = os.environ.get('WOLFRAM_KERNEL_VERSION', None)
9+
v = os.environ.get("WOLFRAM_KERNEL_VERSION", None)
1210
if v:
1311
return float(v)
1412

1513
return 12.0
1614

15+
1716
def _explore_paths(*paths):
1817
highest_version = -1
1918
best_path = None
@@ -60,17 +59,15 @@ def _installation_directories():
6059
yield "/Applications/Wolfram Engine.app/Contents"
6160

6261

63-
6462
def find_default_kernel_path():
6563
""" Look for the most recent installed kernel. """
6664

6765
if six.WINDOWS:
6866
rel = "WolframKernel.exe"
6967
elif six.LINUX:
70-
rel = "Executables/WolframKernel"
68+
rel = "Executables/WolframKernel"
7169
elif six.MACOS:
72-
rel = "MacOS/WolframKernel"
73-
70+
rel = "MacOS/WolframKernel"
7471

7572
for path in _installation_directories():
7673
if rel:

0 commit comments

Comments
 (0)