@@ -122,8 +122,7 @@ def process_type(type_spec: Any) -> Any:
122122        defined types. 
123123
124124        Args: 
125-             type_spec (Any): A type specification which might be a string, 
126-                 dict, or list 
125+             type_spec (Any): A type specification which might be a str, dict, or list 
127126
128127        Returns: 
129128           Any: An appropriate test value for the specified type 
@@ -166,7 +165,7 @@ def process_type(type_spec: Any) -> Any:
166165            # Array type (list) 
167166            elif  type_name  ==  "array" :
168167                items  =  type_spec .get ("items" )
169-                 # We crate  a list with a single element 
168+                 # We create  a list with a single element 
170169                return  [process_type (items )]
171170
172171            # Map type (dictionary/object) 
@@ -252,6 +251,10 @@ def generate_test_event_data_for_data_type(data_type: Any) -> dict:  # pragma: n
252251
253252            item_type  =  args [0 ]
254253
254+             # Handle List of simple types, e.g. List[str] 
255+             if  item_type  in  defaults_per_type :
256+                 return  [defaults_per_type [item_type ]]
257+ 
255258            # Handle List of Dicts, e.g. List[Dict[str, str]] 
256259            if  get_origin (item_type ) is  dict :
257260                dict_key_type , dict_value_type  =  get_args (item_type )
@@ -270,10 +273,6 @@ def generate_test_event_data_for_data_type(data_type: Any) -> dict:  # pragma: n
270273
271274                return  [sample_dict ]
272275
273-             # Handle List of simple types, e.g. List[str] 
274-             if  item_type  in  defaults_per_type :
275-                 return  [defaults_per_type [item_type ]]
276- 
277276            # Handle List of attrs classes, e.g. List[EventData] 
278277            item_data  =  generate_test_event_data_for_data_type (item_type )
279278            return  [item_data ]
0 commit comments