@@ -163,9 +163,9 @@ def add_layer(
163163 self ,
164164 layer_name : str ,
165165 category : str ,
166- dtype_per_layer : Union [str , np .dtype , type ] = None ,
167- dtype_per_channel : Union [str , np .dtype , type ] = None ,
168- num_channels : int = None ,
166+ dtype_per_layer : Optional [ Union [str , np .dtype , type ] ] = None ,
167+ dtype_per_channel : Optional [ Union [str , np .dtype , type ] ] = None ,
168+ num_channels : Optional [ int ] = None ,
169169 ** kwargs : Any ,
170170 ) -> Layer :
171171 """
@@ -262,9 +262,9 @@ def get_or_add_layer(
262262 self ,
263263 layer_name : str ,
264264 category : str ,
265- dtype_per_layer : Union [str , np .dtype , type ] = None ,
266- dtype_per_channel : Union [str , np .dtype , type ] = None ,
267- num_channels : int = None ,
265+ dtype_per_layer : Optional [ Union [str , np .dtype , type ] ] = None ,
266+ dtype_per_channel : Optional [ Union [str , np .dtype , type ] ] = None ,
267+ num_channels : Optional [ int ] = None ,
268268 ** kwargs : Any ,
269269 ) -> Layer :
270270 """
@@ -409,7 +409,7 @@ def add_symlink_layer(
409409 self ,
410410 foreign_layer : Union [str , Path , Layer ],
411411 make_relative : bool = False ,
412- new_layer_name : str = None ,
412+ new_layer_name : Optional [ str ] = None ,
413413 ) -> Layer :
414414 """
415415 Creates a symlink to the data at `foreign_layer` which belongs to another dataset.
@@ -454,7 +454,9 @@ def add_symlink_layer(
454454 return self .layers [layer_name ]
455455
456456 def add_copy_layer (
457- self , foreign_layer : Union [str , Path , Layer ], new_layer_name : str = None
457+ self ,
458+ foreign_layer : Union [str , Path , Layer ],
459+ new_layer_name : Optional [str ] = None ,
458460 ) -> Layer :
459461 """
460462 Copies the data at `foreign_layer` which belongs to another dataset to the current dataset.
@@ -495,8 +497,8 @@ def copy_dataset(
495497 self ,
496498 new_dataset_path : Union [str , Path ],
497499 scale : Optional [Tuple [float , float , float ]] = None ,
498- block_len : int = None ,
499- file_len : int = None ,
500+ block_len : Optional [ int ] = None ,
501+ file_len : Optional [ int ] = None ,
500502 compress : Optional [bool ] = None ,
501503 args : Optional [Namespace ] = None ,
502504 ) -> "Dataset" :
0 commit comments