Commit 46cb513b authored by Baber's avatar Baber
Browse files

handle None

parent 2b56339e
......@@ -10,7 +10,7 @@ import os
import re
from dataclasses import asdict, is_dataclass
from itertools import islice
from typing import Any, Callable, Generator, List, Tuple
from typing import Any, Callable, Generator, List, Optional, Tuple
import numpy as np
import yaml
......@@ -93,12 +93,14 @@ def sanitize_list(sub):
return str(sub)
def simple_parse_args_string(args_string):
def simple_parse_args_string(args_string: Optional[str]) -> dict:
"""
Parses something like
args1=val1,arg2=val2
Into a dictionary
"""
if args_string is None:
return {}
args_string = args_string.strip()
if not args_string:
return {}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment