@@ -608,6 +608,8 @@ def search_for_folders(
608608 local_or_central == "local"
609609 or cfg ["connection_method" ] == "local_filesystem"
610610 ):
611+ assert search_path is not None
612+
611613 if not search_path .exists ():
612614 if verbose :
613615 utils .log_and_message (
@@ -631,7 +633,7 @@ def search_for_folders(
631633
632634
633635def search_local_filesystem (
634- search_path : Path | None ,
636+ search_path : Path ,
635637 search_prefix : str ,
636638 return_full_path : bool = False ,
637639) -> tuple [List [Any ], List [Any ]]:
@@ -646,7 +648,7 @@ def search_local_filesystem(
646648 The path to search (relative to the local or remote drive). For example,
647649 for "local_filesystem" this is the path on the local machine. For any other
648650 connection to central, this is the path on the central storage that has been
649- connected to. Must not be ``None`` when searching the local filesystem.
651+ connected to.
650652
651653 search_prefix
652654 The search string e.g. "sub-*".
@@ -655,11 +657,6 @@ def search_local_filesystem(
655657 If `True`, return the full filepath, otherwise return only the folder/file name.
656658
657659 """
658- if search_path is None :
659- raise ValueError (
660- "search_path cannot be None when searching the local filesystem."
661- )
662-
663660 all_folder_names = []
664661 all_filenames = []
665662
0 commit comments