Skip to content

Commit 62c1511

Browse files
author
Dorian Birraux
committed
refactor
1 parent 4b2e73b commit 62c1511

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

wolframclient/language/array.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,9 @@ def __len__(self):
3737

3838

3939
class PackedArray(NumericArray):
40-
4140
def _valid_type_or_fail(self, type):
4241
if type not in constants.VALID_PACKED_ARRAY_LABEL_TYPES:
4342
raise WolframLanguageException(
4443
"Type %s is not one of the supported packed array types: %s."
45-
% (type, ', '.join(constants.VALID_PACKED_ARRAY_LABEL_TYPES_TUPLE))
44+
% (type, ", ".join(constants.VALID_PACKED_ARRAY_LABEL_TYPES_TUPLE))
4645
)

wolframclient/serializers/wxfencoder/constants.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,16 @@ def _bytes(value):
9191
)
9292
)
9393

94-
VALID_PACKED_ARRAY_LABEL_TYPES_TUPLE = ('Integer8', 'Integer16', 'Integer32', 'Integer64', 'Real32', 'Real64', 'ComplexReal32', 'ComplexReal64')
94+
VALID_PACKED_ARRAY_LABEL_TYPES_TUPLE = (
95+
"Integer8",
96+
"Integer16",
97+
"Integer32",
98+
"Integer64",
99+
"Real32",
100+
"Real64",
101+
"ComplexReal32",
102+
"ComplexReal64",
103+
)
95104
VALID_PACKED_ARRAY_LABEL_TYPES = frozenset(VALID_PACKED_ARRAY_LABEL_TYPES_TUPLE)
96105

97106
STRUCT_MAPPING = Settings(
@@ -107,4 +116,4 @@ def _bytes(value):
107116
Real64=struct.Struct(b"<d"),
108117
ComplexReal32=struct.Struct(b"<f"),
109118
ComplexReal64=struct.Struct(b"<d"),
110-
)
119+
)

0 commit comments

Comments
 (0)