@@ -122,23 +122,20 @@ def test_both_assigned_okay(self):
122
122
self .assertEqual (args .arg_str_required , 'tappy' )
123
123
self .assertEqual (args .arg_list_str_required , ['hi' , 'there' ])
124
124
125
-
126
- # TODO: need to implement list[str] etc.
127
- class ParameterizedStandardCollectionTap (Tap ):
128
- arg_list_str : list [str ]
129
- arg_list_int : list [int ]
130
- arg_list_int_default : list [int ] = [1 , 2 , 5 ]
131
- arg_set_float : set [float ]
132
- arg_set_str_default : set [str ] = {'one' , 'two' , 'five' }
133
- arg_tuple_int : tuple [int , ...]
134
- arg_tuple_float_default : tuple [float , float , float ] = (1.0 , 2.0 , 5.0 )
135
- arg_tuple_str_override : tuple [str , str ] = ('hi' , 'there' )
136
- arg_optional_list_int : Optional [list [int ]] = None
137
-
138
-
139
125
class ParameterizedStandardCollectionTests (TestCase ):
140
126
@unittest .skipIf (sys .version_info < (3 , 9 ), 'Parameterized standard collections (e.g., list[int]) introduced in Python 3.9' )
141
127
def test_parameterized_standard_collection (self ):
128
+ class ParameterizedStandardCollectionTap (Tap ):
129
+ arg_list_str : list [str ]
130
+ arg_list_int : list [int ]
131
+ arg_list_int_default : list [int ] = [1 , 2 , 5 ]
132
+ arg_set_float : set [float ]
133
+ arg_set_str_default : set [str ] = {'one' , 'two' , 'five' }
134
+ arg_tuple_int : tuple [int , ...]
135
+ arg_tuple_float_default : tuple [float , float , float ] = (1.0 , 2.0 , 5.0 )
136
+ arg_tuple_str_override : tuple [str , str ] = ('hi' , 'there' )
137
+ arg_optional_list_int : Optional [list [int ]] = None
138
+
142
139
arg_list_str = ['a' , 'b' , 'pi' ]
143
140
arg_list_int = [- 2 , - 5 , 10 ]
144
141
arg_set_float = {3.54 , 2.235 }
0 commit comments