Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion neo/rawio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,18 @@
WinWcpRawIO,
]


def get_rawio_class(filename_or_dirname):
"""Legacy function for returning class guess from file extension
DEPRECATED
"""

import warnings
warnings.warn('get_rawio_class is deprecated. In the future please use get_rawio')

return get_rawio(filename_or_dirname)


def get_rawio(filename_or_dirname):
"""
Return a neo.rawio class guess from file extension.
"""
Expand Down
6 changes: 3 additions & 3 deletions neo/test/rawiotest/test_get_rawio.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from neo.rawio import get_rawio_class
from neo.rawio import get_rawio
from pathlib import Path
from tempfile import TemporaryDirectory

Expand All @@ -7,7 +7,7 @@ def test_get_rawio_class():
# use plexon io suffix for testing here
non_existant_file = Path('non_existant_folder/non_existant_file.plx')
non_existant_file.unlink(missing_ok=True)
ios = get_rawio_class(non_existant_file)
ios = get_rawio(non_existant_file)

assert ios

Expand All @@ -19,7 +19,7 @@ def test_get_rawio_class_nonsupported_rawio():

non_existant_file = Path('non_existant_folder/non_existant_file.fake')
non_existant_file.unlink(missing_ok=True)
ios = get_rawio_class(non_existant_file)
ios = get_rawio(non_existant_file)

assert ios is None

Expand Down