diff --git a/dvc/remote/base.py b/dvc/remote/base.py index 57a1846a6..0f66b27ab 100644 --- a/dvc/remote/base.py +++ b/dvc/remote/base.py @@ -58,7 +58,7 @@ class RemoteCmdError(DvcException): class RemoteActionNotImplemented(DvcException): def __init__(self, action, scheme): - m = "{} is not supported by {} remote".format(action, scheme) + m = "{} is not supported for {} remotes".format(action, scheme) super(RemoteActionNotImplemented, self).__init__(m) diff --git a/dvc/remote/oss.py b/dvc/remote/oss.py index 9445fd0b2..0abf1a92e 100644 --- a/dvc/remote/oss.py +++ b/dvc/remote/oss.py @@ -69,9 +69,9 @@ class RemoteOSS(RemoteBASE): def oss_service(self): import oss2 - logger.debug("URL {}".format(self.path_info)) - logger.debug("key id {}".format(self.key_id)) - logger.debug("key secret {}".format(self.key_secret)) + logger.debug("URL: {}".format(self.path_info)) + logger.debug("key id: {}".format(self.key_id)) + logger.debug("key secret: {}".format(self.key_secret)) auth = oss2.Auth(self.key_id, self.key_secret) bucket = oss2.Bucket(auth, self.endpoint, self.path_info.bucket) diff --git a/dvc/repo/add.py b/dvc/repo/add.py index 85486c1f7..8fe180d41 100644 --- a/dvc/repo/add.py +++ b/dvc/repo/add.py @@ -37,7 +37,7 @@ def add(repo, targets, recursive=False, no_commit=False, fname=None): "You are adding a large directory '{target}' recursively," " consider tracking it as a whole instead.\n" "{purple}HINT:{nc} Remove the generated DVC-file and then" - " run {cyan}dvc add {target}{nc}".format( + " run `{cyan}dvc add {target}{nc}`".format( purple=colorama.Fore.MAGENTA, cyan=colorama.Fore.CYAN, nc=colorama.Style.RESET_ALL, diff --git a/dvc/repo/gc.py b/dvc/repo/gc.py index 8313f8feb..7d8e0dd22 100644 --- a/dvc/repo/gc.py +++ b/dvc/repo/gc.py @@ -12,7 +12,7 @@ logger = logging.getLogger(__name__) def _do_gc(typ, func, clist): removed = func(clist) if not removed: - logger.info("No unused {} cache to remove.".format(typ)) + logger.info("No unused `{}` cache to remove.".format(typ)) @locked diff --git a/dvc/stage.py b/dvc/stage.py index 236a5f2d3..7aafa5d75 100644 --- a/dvc/stage.py +++ b/dvc/stage.py @@ -116,7 +116,7 @@ class MissingDep(DvcException): else: dep = "dependency" - msg = "missing {}: {}".format(dep, ", ".join(map(str, deps))) + msg = "missing '{}': {}".format(dep, ", ".join(map(str, deps))) super(MissingDep, self).__init__(msg) @@ -128,7 +128,7 @@ class MissingDataSource(DvcException): if len(missing_files) > 1: source += "s" - msg = "missing data {}: {}".format(source, ", ".join(missing_files)) + msg = "missing data '{}': {}".format(source, ", ".join(missing_files)) super(MissingDataSource, self).__init__(msg) diff --git a/dvc/updater.py b/dvc/updater.py index 661221926..4c83084a6 100644 --- a/dvc/updater.py +++ b/dvc/updater.py @@ -124,12 +124,13 @@ class Updater(object): # pragma: no cover def _get_update_instructions(self): instructions = { - "pip": "Run {yellow}pip{reset} install dvc {blue}--upgrade{reset}", - "rpm": "Run {yellow}yum{reset} update dvc", - "brew": "Run {yellow}brew{reset} upgrade dvc", + "pip": "Run `{yellow}pip{reset} install dvc " + "{blue}--upgrade{reset}`", + "rpm": "Run `{yellow}yum{reset} update dvc`", + "brew": "Run `{yellow}brew{reset} upgrade dvc`", "deb": ( - "Run {yellow}apt-get{reset} install" - " {blue}--only-upgrade{reset} dvc" + "Run `{yellow}apt-get{reset} install" + " {blue}--only-upgrade{reset} dvc`" ), "binary": ( "To upgrade follow these steps:\n" @@ -137,12 +138,11 @@ class Updater(object): # pragma: no cover "2. Go to {blue}https://dvc.org{reset}\n" "3. Download and install new binary" ), - "conda": "Run {yellow}conda{reset} update dvc", - "choco": "Run {yellow}choco{reset} upgrade dvc", + "conda": "Run `{yellow}conda{reset} update dvc`", + "choco": "Run `{yellow}choco{reset} upgrade dvc`", None: ( - "Find the latest release at\n{blue}" - "https://github.com/iterative/dvc/releases/latest" - "{reset}" + "Find the latest release at\n" + "{blue}https://github.com/iterative/dvc/releases/latest{reset}" ), } diff --git a/dvc/utils/__init__.py b/dvc/utils/__init__.py index a1d15aa0b..92fd34a8a 100644 --- a/dvc/utils/__init__.py +++ b/dvc/utils/__init__.py @@ -50,7 +50,9 @@ def file_md5(fname): no_progress_bar = True if size >= LARGE_FILE_SIZE: no_progress_bar = False - msg = "Computing md5 for a large file {}. This is only done once." + msg = ( + "Computing md5 for a large file '{}'. This is only done once." + ) logger.info(msg.format(relpath(fname))) name = relpath(fname)