Skip to content

Commit

Permalink
Merge branch 'master' of github.com:swansonk14/typed-argument-parser
Browse files Browse the repository at this point in the history
  • Loading branch information
swansonk14 committed Jun 7, 2021
2 parents f03681e + 8e29d9d commit 25644c3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tap/tap.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
from functools import partial
import json
from pprint import pformat
import re
from shlex import quote
import sys
import time
from warnings import warn
from types import MethodType
from typing import Any, Callable, Dict, List, Optional, Sequence, Set, Tuple, TypeVar, Union, get_type_hints
from typing_inspect import is_literal_type, get_args
from warnings import warn

from tap.utils import (
get_class_variables,
Expand Down Expand Up @@ -352,9 +352,8 @@ def get_reproducibility_info() -> Dict[str, str]:
:return: A dictionary of reproducibility information.
"""
args = [f"'{arg}'" if re.search(r'\s', arg) else arg for arg in sys.argv]
reproducibility = {
'command_line': f'python {" ".join(args)}',
'command_line': f'python {" ".join(quote(arg) for arg in sys.argv)}',
'time': time.strftime('%c')
}

Expand Down

0 comments on commit 25644c3

Please sign in to comment.