address PR review comments

This commit is contained in:
Ivan Shcheklein
2019-02-10 11:06:23 -08:00
parent 8817864e7a
commit 41befea210
3 changed files with 10 additions and 9 deletions
+5 -4
View File
@@ -91,15 +91,15 @@ def add_parser(subparsers, parent_parser):
"--outs",
action="append",
default=[],
help="Declare output data file or data directory.",
help="Declare output file or directory.",
)
run_parser.add_argument(
"-O",
"--outs-no-cache",
action="append",
default=[],
help="Declare output data file or directory "
"(sync to Git, not DVC cache).",
help="Declare output file or directory "
"(do not put into DVC cache).",
)
run_parser.add_argument(
"-m",
@@ -113,7 +113,8 @@ def add_parser(subparsers, parent_parser):
"--metrics-no-cache",
action="append",
default=[],
help="Declare output metric file or " "directory (not cached by DVC).",
help="Declare output metric file or directory "
"(do not put into DVC cache).",
)
run_parser.add_argument(
"-f",
+2 -2
View File
@@ -237,7 +237,7 @@ def _walk_exc(exc):
def _parse_exc():
exc = sys.exc_info()[1]
if not exc:
return None, ""
return (None, "")
exc_list, tb_list = _walk_exc(exc)
@@ -251,7 +251,7 @@ def _parse_exc():
else:
stack_trace = ""
return exception, stack_trace
return (exception, stack_trace)
def _description(message, exception):
+3 -3
View File
@@ -286,10 +286,10 @@ class Stage(object):
@classmethod
def _stage_fname_cwd(cls, fname, cwd, outs, add):
if fname and cwd:
return fname, cwd
return (fname, cwd)
if not outs:
return cls.STAGE_FILE, cwd if cwd else os.getcwd()
return (cls.STAGE_FILE, cwd if cwd else os.getcwd())
out = outs[0]
if out.scheme == "local":
@@ -303,7 +303,7 @@ class Stage(object):
if not cwd or (add and out.is_local):
cwd = path.dirname(out.path)
return fname, cwd
return (fname, cwd)
@staticmethod
def _check_inside_project(project, cwd):