mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-19 23:11:44 +01:00
address PR review comments
This commit is contained in:
+5
-4
@@ -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
@@ -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
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user