2929from zarr .hierarchy import open_group
3030from zarr .storage import FSStore
3131
32+ from .extinfo import external_info_str , get_extinfo , get_images , set_external_info
3233from .masks import (
3334 MASK_DTYPE_SIZE ,
3435 MaskSaver ,
4142 image_to_zarr ,
4243 plate_to_zarr ,
4344)
44- from .extinfo import (
45- get_images ,
46- set_external_info ,
47- get_extinfo ,
48- external_info_str
49- )
5045
5146HELP = """Export data in zarr format.
5247
@@ -205,8 +200,7 @@ def _configure(self, parser: Parser) -> None:
205200 polygons .add_argument (
206201 "--label-name" ,
207202 help = (
208- "Name of the array that will be stored. Ignored for "
209- "--style=split"
203+ "Name of the array that will be stored. Ignored for " "--style=split"
210204 ),
211205 default = "0" ,
212206 )
@@ -236,8 +230,7 @@ def _configure(self, parser: Parser) -> None:
236230 masks .add_argument (
237231 "--label-name" ,
238232 help = (
239- "Name of the array that will be stored. Ignored for "
240- "--style=split"
233+ "Name of the array that will be stored. Ignored for " "--style=split"
241234 ),
242235 default = "0" ,
243236 )
@@ -302,10 +295,7 @@ def _configure(self, parser: Parser) -> None:
302295 export .add_argument (
303296 "--max_workers" ,
304297 default = None ,
305- help = (
306- "Maximum number of workers (only for "
307- "use with bioformats2raw)"
308- ),
298+ help = ("Maximum number of workers (only for " "use with bioformats2raw)" ),
309299 )
310300 export .add_argument (
311301 "object" ,
@@ -428,8 +418,7 @@ def extinfo(self, args: argparse.Namespace) -> None:
428418 args .entityType ,
429419 int (args .entityId ),
430420 )
431- img = self .gateway .getUpdateService ()\
432- .saveAndReturnObject (img )
421+ img = self .gateway .getUpdateService ().saveAndReturnObject (img )
433422 self .ctx .out (
434423 f"Set ExternalInfo for image ({ img .id ._val } ) "
435424 f"{ img .name ._val } :\n "
@@ -443,16 +432,14 @@ def extinfo(self, args: argparse.Namespace) -> None:
443432 elif args .reset :
444433 if extinfo :
445434 img .details .externalInfo = None
446- img = self .gateway .getUpdateService ()\
447- .saveAndReturnObject (img )
435+ img = self .gateway .getUpdateService ().saveAndReturnObject (img )
448436 self .ctx .out (
449437 f"Removed ExternalInfo from image "
450438 f"({ img .id ._val } ) { img .name ._val } "
451439 )
452440 else :
453441 self .ctx .out (
454- f"Image ({ img .id ._val } ) { img .name ._val } "
455- "has no ExternalInfo"
442+ f"Image ({ img .id ._val } ) { img .name ._val } " "has no ExternalInfo"
456443 )
457444 else :
458445 if extinfo :
@@ -463,8 +450,7 @@ def extinfo(self, args: argparse.Namespace) -> None:
463450 )
464451 else :
465452 self .ctx .out (
466- f"Image ({ img .id ._val } ) { img .name ._val } has no "
467- "ExternalInfo"
453+ f"Image ({ img .id ._val } ) { img .name ._val } has no " "ExternalInfo"
468454 )
469455
470456 def _lookup (
@@ -477,9 +463,7 @@ def _lookup(
477463 self .ctx .die (110 , f"No such { otype } : { oid } " )
478464 return obj
479465
480- def _bf_export (
481- self , image : BlitzObjectWrapper , args : argparse .Namespace
482- ) -> None :
466+ def _bf_export (self , image : BlitzObjectWrapper , args : argparse .Namespace ) -> None :
483467 if args .bfpath :
484468 abs_path = Path (args .bfpath )
485469 elif image .getInplaceImport ():
0 commit comments