@@ -38,20 +38,20 @@ class Constants:
38
38
def __init__ (
39
39
self ,
40
40
* ,
41
- # spiritually an " AbstractSet, with the addition of a .add method"
42
- integers : set [int ] | SortedSet [int ] = None ,
43
- floats : set [float ] | SortedSet [float ] = None ,
44
- bytes : set [bytes ] | SortedSet [bytes ] = None ,
45
- strings : set [str ] | SortedSet [str ] = None ,
41
+ # spiritually " an AbstractSet, with the addition of a .add method"
42
+ integers : Union [ set [int ], SortedSet [int ] ] = None ,
43
+ floats : Union [ set [float ], SortedSet [float ] ] = None ,
44
+ bytes : Union [ set [bytes ], SortedSet [bytes ] ] = None ,
45
+ strings : Union [ set [str ], SortedSet [str ] ] = None ,
46
46
):
47
47
self .integers = set () if integers is None else integers
48
48
self .floats = set () if floats is None else floats
49
49
self .bytes = set () if bytes is None else bytes
50
50
self .strings = set () if strings is None else strings
51
51
52
52
def set_for_type (
53
- self , constant_type : type [ConstantT ] | ChoiceTypeT
54
- ) -> set [ConstantT ] | SortedSet [ConstantT ]:
53
+ self , constant_type : Union [ type [ConstantT ], ChoiceTypeT ]
54
+ ) -> Union [ set [ConstantT ], SortedSet [ConstantT ] ]:
55
55
if constant_type is int or constant_type == "integer" :
56
56
return self .integers
57
57
elif constant_type is float or constant_type == "float" :
0 commit comments