Skip to content

Commit

Permalink
add save load task obj for backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
TomDonoghue committed May 26, 2024
1 parent 8625d8a commit 2da0020
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion convnwb/io/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def load_configs(files, folder=None):
return configs


### TASK OBJECTS
### CUSTOM OBJECTS

def save_object(custom_object, file_name, folder=None):
"""Save a custom object.
Expand Down Expand Up @@ -193,6 +193,11 @@ def load_object(file_name, folder=None):

return custom_object

# alias these functions for backwards compatibility
save_task_object = save_object
def load_task_object(file_name, folder=None):
return load_object(check_ext(file_name, '.task'), folder)
load_task_object.__doc__ = load_object

## OTHER FILE I/O

Expand Down

0 comments on commit 2da0020

Please sign in to comment.