Skip to content

Commit

Permalink
318: update docs in utils
Browse files Browse the repository at this point in the history
  • Loading branch information
John-Sharples committed Sep 12, 2024
1 parent f2eb665 commit 4924f61
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions METdbLoad/test/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,17 @@ def get_xml_test_file(tmp_path, met_data_dir, met_tool, load_flags={}):
return xml_path


def dict_to_args(args_dics):
"""Convert a dcit to an argparse Namespace"""
def dict_to_args(args_dict):
"""Convert a dcit to an argparse Namespace
Args:
args_dict (dict): key value pairs to be converted to
argparse Namespace.
Returns:
argparse.Namespace
"""
test_args = Namespace()
for k, v in args_dics.items():
for k, v in args_dict.items():
setattr(test_args, k, v)
return test_args

0 comments on commit 4924f61

Please sign in to comment.