Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion dvc/analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,6 @@ def _find_or_create_user_id():
return user_id

except LockError:
logger.debug("Failed to acquire {lockfile}".format(lockfile=lockfile))
logger.debug(
"Failed to acquire '{lockfile}'".format(lockfile=lockfile)
)
4 changes: 2 additions & 2 deletions dvc/command/remove.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def _is_outs_only(self, target):
if self.args.force:
return False

msg = "Are you sure you want to remove {} with its outputs?".format(
msg = "Are you sure you want to remove '{}' with its outputs?".format(
target
)

Expand All @@ -38,7 +38,7 @@ def run(self):
outs_only = self._is_outs_only(target)
self.repo.remove(target, outs_only=outs_only)
except DvcException:
logger.exception("failed to remove {}".format(target))
logger.exception("failed to remove '{}'".format(target))
return 1
return 0

Expand Down
2 changes: 1 addition & 1 deletion dvc/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def Choices(*choices):
*choices: pass allowed values as arguments, or pass a list or
tuple as a single argument
"""
return Any(*choices, msg="expected one of {}".format(",".join(choices)))
return Any(*choices, msg="expected one of {}".format(", ".join(choices)))


class Config(object): # pylint: disable=too-many-instance-attributes
Expand Down
2 changes: 1 addition & 1 deletion dvc/remote/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def __init__(self, remote, cmd, ret, err):

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)


Expand Down
6 changes: 3 additions & 3 deletions dvc/remote/oss.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ def __init__(self, repo, config):
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)
Expand Down
2 changes: 1 addition & 1 deletion dvc/repo/add.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion dvc/repo/gc.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
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
Expand Down
4 changes: 2 additions & 2 deletions dvc/stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def __init__(self, deps):
else:
dep = "dependency"

msg = "missing {}: {}".format(dep, ", ".join(map(str, deps)))
msg = "missing '{}': {}".format(dep, ", ".join(map(str, deps)))
super(MissingDep, self).__init__(msg)


Expand All @@ -128,7 +128,7 @@ def __init__(self, missing_files):
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)


Expand Down
20 changes: 10 additions & 10 deletions dvc/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,25 +124,25 @@ def _notify(self):

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"
"1. Uninstall dvc binary\n"
"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}"
),
}

Expand Down
4 changes: 3 additions & 1 deletion dvc/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion tests/func/test_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def test_warn_about_large_directories(self):
"You are adding a large directory 'large-dir' recursively,"
" consider tracking it as a whole instead.\n"
"{purple}HINT:{nc} Remove the generated DVC-file and then"
" run {cyan}dvc add large-dir{nc}".format(
" run `{cyan}dvc add large-dir{nc}`".format(
purple=colorama.Fore.MAGENTA,
cyan=colorama.Fore.CYAN,
nc=colorama.Style.RESET_ALL,
Expand Down