@@ -174,6 +174,7 @@ cdef class StrType:
174
174
self .container = container
175
175
176
176
cdef str _convert(self , str string):
177
+ string = decode(string.encode())
177
178
if self .container:
178
179
return remove_single_quotes(string)
179
180
return string
@@ -524,7 +525,7 @@ cdef class TupleType:
524
525
525
526
cdef tuple _convert(self , str string):
526
527
return tuple (
527
- tp(decode( val.encode()) )
528
+ tp(val)
528
529
for tp, val in zip (self .types, seq_parser(string[1 :- 1 ]))
529
530
)
530
531
@@ -554,7 +555,7 @@ cdef class MapType:
554
555
cdef dict _convert(self , str string):
555
556
key, value = string[1 :- 1 ].split(' :' , 1 )
556
557
return {
557
- self .key_type.p_type(decode( key.encode())) : self .value_type.p_type(decode( value.encode()) )
558
+ self .key_type.p_type(key) : self .value_type.p_type(value)
558
559
}
559
560
560
561
cpdef dict p_type(self , string):
@@ -579,7 +580,7 @@ cdef class ArrayType:
579
580
)
580
581
581
582
cdef list _convert(self , str string):
582
- return [self .type.p_type(decode( val.encode()) ) for val in seq_parser(string[1 :- 1 ])]
583
+ return [self .type.p_type(val) for val in seq_parser(string[1 :- 1 ])]
583
584
584
585
cpdef list p_type(self , str string):
585
586
return self ._convert(string)
@@ -611,7 +612,7 @@ cdef class NestedType:
611
612
for val in seq_parser(string[1 :- 1 ]):
612
613
temp = []
613
614
for tp, elem in zip (self .types, seq_parser(val.strip(" ()" ))):
614
- temp.append(tp.p_type(decode( elem.encode()) ))
615
+ temp.append(tp.p_type(elem))
615
616
result.append(tuple (temp))
616
617
return result
617
618
0 commit comments