From 41befea210989c8bbbf3d87be13b506a861d915a Mon Sep 17 00:00:00 2001 From: Ivan Shcheklein Date: Sun, 10 Feb 2019 11:06:23 -0800 Subject: [PATCH] address PR review comments --- dvc/command/run.py | 9 +++++---- dvc/logger.py | 4 ++-- dvc/stage.py | 6 +++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/dvc/command/run.py b/dvc/command/run.py index a978b8daf..c070f2708 100644 --- a/dvc/command/run.py +++ b/dvc/command/run.py @@ -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", diff --git a/dvc/logger.py b/dvc/logger.py index 108571706..fcc0663fd 100644 --- a/dvc/logger.py +++ b/dvc/logger.py @@ -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): diff --git a/dvc/stage.py b/dvc/stage.py index cc1888d33..8e885befc 100644 --- a/dvc/stage.py +++ b/dvc/stage.py @@ -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):