From b3ff72c98382c856457b6349de19b3af6565153f Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Wed, 29 Jan 2020 00:21:30 -0600 Subject: [PATCH] term: review usage of "version" in strings --- dvc/cli.py | 2 +- dvc/output/base.py | 2 +- dvc/state.py | 8 ++++---- dvc/version.py | 4 ++-- tests/func/test_data_cloud.py | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dvc/cli.py b/dvc/cli.py index 37d148d7c..7deb82a70 100644 --- a/dvc/cli.py +++ b/dvc/cli.py @@ -89,7 +89,7 @@ class DvcParser(argparse.ArgumentParser): class VersionAction(argparse.Action): # pragma: no cover # pylint: disable=too-few-public-methods - """Shows dvc version and exits.""" + """Shows DVC version and exits.""" def __call__(self, parser, namespace, values, option_string=None): from dvc import __version__ diff --git a/dvc/output/base.py b/dvc/output/base.py index ee69e30bc..da0e7de90 100644 --- a/dvc/output/base.py +++ b/dvc/output/base.py @@ -412,7 +412,7 @@ class OutputBase(object): if not self.info: logger.warning( "Output '{}'({}) is missing version info. Cache for it will " - "not be collected. Use dvc repro to get your pipeline up to " + "not be collected. Use `dvc repro` to get your pipeline up to " "date.".format(self, self.stage) ) return NamedCache() diff --git a/dvc/state.py b/dvc/state.py index 88e5c8107..6c9106d1e 100644 --- a/dvc/state.py +++ b/dvc/state.py @@ -23,13 +23,13 @@ logger = logging.getLogger(__name__) class StateVersionTooNewError(DvcException): - """Thrown when dvc version is older than the state database version.""" + """Thrown when DVC version is older than the state database version.""" def __init__(self, dvc_version, expected, actual): super().__init__( - "you are using an old version '{dvc_version}' of dvc that is " - "using state file version '{expected}' which is not compatible " - "with the state file version '{actual}' that is used in this " + "you are using an old version '{dvc_version}' of DVC that is " + "using state file version '{expected}', which is not compatible " + "with the state file version '{actual}', that is used in this " "repo. Please upgrade right now!".format( dvc_version=dvc_version, expected=expected, actual=actual ) diff --git a/dvc/version.py b/dvc/version.py index e3be5a488..d4bf622aa 100644 --- a/dvc/version.py +++ b/dvc/version.py @@ -11,7 +11,7 @@ _BASE_VERSION = "0.82.3" def _generate_version(base_version): - """Generate a version with information about the git repository""" + """Generate a version with information about the Git repository.""" pkg_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) if not _is_git_repo(pkg_dir) or not _have_git(): @@ -28,7 +28,7 @@ def _generate_version(base_version): def _is_git_repo(dir_path): - """Is the given directory version-controlled with git?""" + """Is the given directory version-controlled with Git?""" return os.path.exists(os.path.join(dir_path, ".git")) diff --git a/tests/func/test_data_cloud.py b/tests/func/test_data_cloud.py index fe3aa432f..f4de70631 100644 --- a/tests/func/test_data_cloud.py +++ b/tests/func/test_data_cloud.py @@ -498,9 +498,9 @@ class TestWarnOnOutdatedStage(TestDvc): self._caplog.clear() self.main(["status", "-c"]) expected_warning = ( - "Output 'bar'(Stage: 'bar.dvc') is missing version info." - " Cache for it will not be collected." - " Use dvc repro to get your pipeline up to date." + "Output 'bar'(Stage: 'bar.dvc') is missing version info. " + "Cache for it will not be collected. " + "Use `dvc repro` to get your pipeline up to date." ) assert expected_warning in self._caplog.text