Skip to content

Commit 2559871

Browse files
committed
code refactor
1 parent ba8fb65 commit 2559871

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

wolframclient/tests/serializers/wl_serialization.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ def test_datetime(self):
9292

9393
def test_date(self):
9494

95-
self.compare(test_datetime().date(), b'DateObject[{2000, 1, 1}, "Day", "Gregorian", None]')
95+
self.compare(
96+
test_datetime().date(), b'DateObject[{2000, 1, 1}, "Day", "Gregorian", None]'
97+
)
9698

9799
def test_timedelta(self):
98100

wolframclient/utils/api.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
from wolframclient.utils.importutils import API
44

55
ast = API(
6-
Module = 'ast.Module',
7-
PyCF_ONLY_AST = 'ast.PyCF_ONLY_AST',
8-
Expr = 'ast.Expr',
9-
Expression = 'ast.Expression',
10-
FunctionDef = 'ast.FunctionDef',
11-
ClassDef = 'ast.ClassDef',
6+
Module="ast.Module",
7+
PyCF_ONLY_AST="ast.PyCF_ONLY_AST",
8+
Expr="ast.Expr",
9+
Expression="ast.Expression",
10+
FunctionDef="ast.FunctionDef",
11+
ClassDef="ast.ClassDef",
1212
)
1313

1414
pytz = API(

wolframclient/utils/externalevaluate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
# https://github.com/ipython/ipython/issues/11590
3434
# PY_38 requires type_ignores to be a list, other versions are not accepting a second argument
3535

36-
def Module(code, type_ignores = []):
36+
def Module(code, type_ignores=[]):
3737
return ast.Module(code, type_ignores)
3838

3939

wolframclient/utils/six.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
from __future__ import absolute_import, print_function, unicode_literals
22

3-
import datetime
4-
import decimal
53
import itertools
64
import platform
75
import sys
@@ -61,4 +59,4 @@
6159
itertools.groupby,
6260
]
6361
if not PY2:
64-
iterable_types.extend((map, range))
62+
iterable_types.extend((map, range))

0 commit comments

Comments
 (0)