Skip to content

Commit 53be5e1

Browse files
committed
refine set dtype
1 parent 93c2211 commit 53be5e1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

dargs/dargs.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,10 @@ def reorg_dtype(self):
6767
if isinstance(self.dtype, type) or self.dtype is None:
6868
self.dtype = [self.dtype]
6969
# remove duplicate
70-
self.dtype = set(self.dtype)
70+
self.dtype = {dt if type(dt) is type else type(dt) for dt in self.dtype}
7171
# check conner cases
7272
if self.sub_fields or self.sub_variants:
7373
self.dtype.add(list if self.repeat else dict)
74-
if None in self.dtype:
75-
self.dtype.remove(None)
76-
self.dtype.add(type(None))
7774
# and make it compatible with `isinstance`
7875
self.dtype = tuple(self.dtype)
7976

0 commit comments

Comments
 (0)