File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 246246 WinWcpRawIO ,
247247]
248248
249-
250249def get_rawio_class (filename_or_dirname ):
250+ """Legacy function for returning class guess from file extension
251+ DEPRECATED
252+ """
253+
254+ import warnings
255+ warnings .warn ('get_rawio_class is deprecated. In the future please use get_rawio' )
256+
257+ return get_rawio (filename_or_dirname )
258+
259+
260+ def get_rawio (filename_or_dirname ):
251261 """
252262 Return a neo.rawio class guess from file extension.
253263 """
Original file line number Diff line number Diff line change 1- from neo .rawio import get_rawio_class
1+ from neo .rawio import get_rawio
22from pathlib import Path
33from tempfile import TemporaryDirectory
44
@@ -7,7 +7,7 @@ def test_get_rawio_class():
77 # use plexon io suffix for testing here
88 non_existant_file = Path ('non_existant_folder/non_existant_file.plx' )
99 non_existant_file .unlink (missing_ok = True )
10- ios = get_rawio_class (non_existant_file )
10+ ios = get_rawio (non_existant_file )
1111
1212 assert ios
1313
@@ -19,7 +19,7 @@ def test_get_rawio_class_nonsupported_rawio():
1919
2020 non_existant_file = Path ('non_existant_folder/non_existant_file.fake' )
2121 non_existant_file .unlink (missing_ok = True )
22- ios = get_rawio_class (non_existant_file )
22+ ios = get_rawio (non_existant_file )
2323
2424 assert ios is None
2525
You can’t perform that action at this time.
0 commit comments