-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
The proc function in packs/proc/proc.py calls the process_bin_WD2 function, passing in two arguments from the config file: file_path & save_path. The way these two arguments are extracted from the config file (shown below) could be problematic if the config file passed in also contains optional/additional parameters in future.
conf_dict = read_config_file(full_path)
# removing the first two components so that they can be fed into functions
arg_dict = dict(list(conf_dict.items())[2:])
# check the method implemented, currently just process
match conf_dict['process']:
case 'decode':
if conf_dict['wavedump_edition'] == 2:
process_bin_WD2(**arg_dict)I suggest we extract the required parameters by their key, making the code safer and robust in case of future changes.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Prio 2