1515
1616
1717class DataFileNotFoundError (BaseException ):
18- def __init__ (self , missing_paths , * args , ** kwargs ):
18+ def __init__ (self , missing_paths , * args ):
1919 self .missing_paths = missing_paths
20- super (DataFileNotFoundError , self ).__init__ (* args , ** kwargs )
20+ super (DataFileNotFoundError , self ).__init__ (* args )
2121
2222
2323class PathlibJSONEncoder (json .JSONEncoder ):
@@ -84,7 +84,7 @@ def import_filters(path, pipeline, strict=False):
8484
8585 Parameters
8686 ----------
87- path: pathlib.Path or str
87+ path: pathlib.Path or str or io.IOBase
8888 Path to the filter file
8989 pipeline: shapeout2.pipeline.Pipeline
9090 Analysis pipeline to import filters to
@@ -292,7 +292,7 @@ def find_file(original_path, search_paths, partial_hash, size_read):
292292 return path
293293
294294
295- def open_session (path , pipeline = None , search_paths = [] ):
295+ def open_session (path , pipeline = None , search_paths = None ):
296296 """Load a session (optionally overriding an existing pipeline)
297297
298298 Parameters
@@ -305,6 +305,8 @@ def open_session(path, pipeline=None, search_paths=[]):
305305 Paths to search for missing measurements; entries may be
306306 directories or .rtdc files
307307 """
308+ if search_paths is None :
309+ search_paths = []
308310 path = pathlib .Path (path )
309311 if pipeline is None :
310312 pipeline = Pipeline ()
0 commit comments