@@ -270,24 +270,25 @@ def _generate_and_write_pointers(
270270 pointer_data : list [list [str ]] = []
271271 batch_upsert_items : list [dict [str , Any ]] = []
272272
273- for pointer_type , template in templates .items ():
274- for custodian in CUSTODIANS :
275- batch_items , csv_rows , counter = _generate_pointers_for_custodian (
276- template ,
277- pointer_type ,
278- custodian ,
279- pointers_per_type ,
280- counter ,
281- testnum_iter ,
282- )
273+ for (pointer_type , template ), custodian in (
274+ (item , cust ) for item in templates .items () for cust in CUSTODIANS
275+ ):
276+ batch_items , csv_rows , counter = _generate_pointers_for_custodian (
277+ template ,
278+ pointer_type ,
279+ custodian ,
280+ pointers_per_type ,
281+ counter ,
282+ testnum_iter ,
283+ )
283284
284- pointer_data .extend (csv_rows )
285+ pointer_data .extend (csv_rows )
285286
286- for item in batch_items :
287- batch_upsert_items .append (item )
288- if len (batch_upsert_items ) >= 25 :
289- _write_batch_to_dynamodb (table_name , batch_upsert_items )
290- batch_upsert_items = []
287+ for item in batch_items :
288+ batch_upsert_items .append (item )
289+ if len (batch_upsert_items ) >= 25 :
290+ _write_batch_to_dynamodb (table_name , batch_upsert_items )
291+ batch_upsert_items = []
291292
292293 _write_batch_to_dynamodb (table_name , batch_upsert_items )
293294
0 commit comments