"stubs/torch/vscode:/vscode.git/clone" did not exist on "35d4129f81523c279fac193cffc909bb8214acec"
Commit 46cb513b authored by Baber's avatar Baber
Browse files

handle None

parent 2b56339e
...@@ -10,7 +10,7 @@ import os ...@@ -10,7 +10,7 @@ import os
import re import re
from dataclasses import asdict, is_dataclass from dataclasses import asdict, is_dataclass
from itertools import islice 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 numpy as np
import yaml import yaml
...@@ -93,12 +93,14 @@ def sanitize_list(sub): ...@@ -93,12 +93,14 @@ def sanitize_list(sub):
return str(sub) return str(sub)
def simple_parse_args_string(args_string): def simple_parse_args_string(args_string: Optional[str]) -> dict:
""" """
Parses something like Parses something like
args1=val1,arg2=val2 args1=val1,arg2=val2
Into a dictionary Into a dictionary
""" """
if args_string is None:
return {}
args_string = args_string.strip() args_string = args_string.strip()
if not args_string: if not args_string:
return {} 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