@@ -111,7 +111,9 @@ def folder(self):
111111 )
112112
113113
114- def filter_bluesky (items :Iterable [pathlib .Path ], ** bluesky_identifiers ) -> Generator [pathlib .Path , None , None ]:
114+ def filter_bluesky (
115+ items : Iterable [pathlib .Path ], ** bluesky_identifiers
116+ ) -> Generator [pathlib .Path , None , None ]:
115117 """
116118 Filter an iterator of folder names for bluesky folder pattern that match specified values.
117119
@@ -120,7 +122,7 @@ def filter_bluesky(items:Iterable[pathlib.Path], **bluesky_identifiers) -> Gener
120122
121123 items: pathlikes
122124 potential paths of bluesky folders
123-
125+
124126 kwargs
125127 ------
126128
@@ -130,7 +132,7 @@ def filter_bluesky(items:Iterable[pathlib.Path], **bluesky_identifiers) -> Gener
130132 Yields
131133 -------
132134
133- pathlib.Path:
135+ pathlib.Path:
134136 bluesky folders corresponding to full matches with the bluesky_identifiers
135137
136138 Examples
@@ -139,7 +141,7 @@ def filter_bluesky(items:Iterable[pathlib.Path], **bluesky_identifiers) -> Gener
139141 # match within a directory
140142 spooky_folders = [
141143 info for info in filter_bluesky(
142- data_folder.iterdir(),
144+ data_folder.iterdir(),
143145 date="2025-10-31"
144146 )
145147 ]
@@ -151,7 +153,7 @@ def filter_bluesky(items:Iterable[pathlib.Path], **bluesky_identifiers) -> Gener
151153 for item in map (pathlib .Path , items ):
152154 if (info := parse_folder_name (item .name )) is not None :
153155 idict = info ._asdict ()
154- if all (idict [k ] == v for k ,v in bluesky_identifiers .items ()):
156+ if all (idict [k ] == v for k , v in bluesky_identifiers .items ()):
155157 yield item
156158
157159
@@ -177,10 +179,9 @@ def bluesky_paths(dir: pathlib.Path, **bluesky_identifiers) -> list[pathlib.Path
177179 BlueskyFolders corresponding to full matches with the bluesky_identifiers
178180 """
179181
180- return sorted ([
181- dir / info .folder
182- for info in filter_bluesky (dir .iterdir (), ** bluesky_identifiers )
183- ])
182+ return sorted (
183+ [dir / info .folder for info in filter_bluesky (dir .iterdir (), ** bluesky_identifiers )]
184+ )
184185
185186
186187def parse_folder_name (folder : str ) -> FolderInfo | None :
0 commit comments