File tree 2 files changed +8
-9
lines changed 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 2
2
~~~~~~~~~~~~~~~
3
3
4
4
"""
5
- __version_info__ = 0 , 3 , 4
5
+ __version_info__ = 0 , 3 , 5
6
6
__version__ = '.' .join (str (v ) for v in __version_info__ )
Original file line number Diff line number Diff line change @@ -25,23 +25,22 @@ def dst(self, dt):
25
25
utc = UTC ()
26
26
27
27
28
- if hasattr (typing , 'UnionMeta ' ):
28
+ if hasattr (typing , '_Union ' ):
29
29
def is_union_type (type_ ):
30
- return isinstance (type_ , typing .UnionMeta ) or \
31
- isinstance (type (type_ ), typing .UnionMeta )
30
+ return isinstance (type_ , typing ._Union )
32
31
33
32
def get_union_types (type_ ):
34
33
if is_union_type (type_ ):
35
- return type_ .__union_params__ \
36
- if hasattr (type_ , '__union_params__' ) \
37
- else type_ .__args__
34
+ return type_ .__args__
38
35
else :
39
36
def is_union_type (type_ ):
40
- return isinstance (type_ , typing ._Union )
37
+ return isinstance (type_ , typing .UnionMeta )
41
38
42
39
def get_union_types (type_ ):
43
40
if is_union_type (type_ ):
44
- return type_ .__args__
41
+ return type_ .__union_params__ \
42
+ if hasattr (type_ , '__union_params__' ) \
43
+ else type_ .__args__
45
44
46
45
47
46
def get_abstract_param_types (type_ ):
You can’t perform that action at this time.
0 commit comments