@@ -232,14 +232,14 @@ def test_build_zarr_stac_item_structure(self):
232232 self .assertIn ("collection" , link_rels )
233233
234234 # root and parent point to the S3 catalog
235- root_link = next (l for l in item .links if l .rel == "root" )
235+ root_link = next (lnk for lnk in item .links if lnk .rel == "root" )
236236 self .assertEqual (
237237 root_link .target ,
238238 "s3://test-bucket/stac/my-collection/catalog.json" ,
239239 )
240240
241241 # collection link points to the OSC GitHub collection
242- coll_link = next (l for l in item .links if l .rel == "collection" )
242+ coll_link = next (lnk for lnk in item .links if lnk .rel == "collection" )
243243 self .assertIn ("open-science-catalog-metadata" , coll_link .target )
244244 self .assertIn ("mock-collection-id" , coll_link .target )
245245
@@ -286,9 +286,9 @@ def test_build_dataset_stac_collection_adds_s3_catalog_child_link(self):
286286 collection = self .generator .build_dataset_stac_collection (
287287 mode = "dataset" , stac_catalog_s3_root = s3_root
288288 )
289- child_links = [l for l in collection .links if l .rel == "child" ]
289+ child_links = [lnk for lnk in collection .links if lnk .rel == "child" ]
290290 s3_child = next (
291- (l for l in child_links if "s3://" in str (l .target )), None
291+ (lnk for lnk in child_links if "s3://" in str (lnk .target )), None
292292 )
293293 self .assertIsNotNone (s3_child , "Expected a child link pointing to S3 catalog" )
294294 self .assertEqual (
@@ -300,9 +300,9 @@ def test_build_dataset_stac_collection_no_s3_child_link_by_default(self):
300300 """No S3 child link is added when stac_catalog_s3_root is absent."""
301301 collection = self .generator .build_dataset_stac_collection (mode = "dataset" )
302302 s3_child_links = [
303- l
304- for l in collection .links
305- if l .rel == "child" and "s3://" in str (getattr (l , "target" , "" ))
303+ lnk
304+ for lnk in collection .links
305+ if lnk .rel == "child" and "s3://" in str (getattr (lnk , "target" , "" ))
306306 ]
307307 self .assertEqual (len (s3_child_links ), 0 )
308308
0 commit comments