From 8787995504f4af34663ef2aad6ac6e1845e2d0ce Mon Sep 17 00:00:00 2001 From: Zhanibek Date: Mon, 25 Mar 2019 16:21:18 +0600 Subject: [PATCH] dvc: fixes style issues with string ops --- dvc/command/diff.py | 4 ++-- dvc/repo/diff.py | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dvc/command/diff.py b/dvc/command/diff.py index 3159b23bb..e7ff8b395 100644 --- a/dvc/command/diff.py +++ b/dvc/command/diff.py @@ -41,11 +41,11 @@ def add_parser(subparsers, parent_parser): "target", help="Source path to a data file or directory." ) diff_parser.add_argument( - "a_ref", help="Git tag/reference from which diff calculates" + "a_ref", help="Git reference from which diff calculates" ) diff_parser.add_argument( "b_ref", - help="Git tag/reference till which diff calculates", + help="Git reference till which diff calculates", nargs="?", default=None, ) diff --git a/dvc/repo/diff.py b/dvc/repo/diff.py index 6261068dd..c62a24ee7 100644 --- a/dvc/repo/diff.py +++ b/dvc/repo/diff.py @@ -1,3 +1,5 @@ +from __future__ import unicode_literals + import os import math @@ -21,7 +23,7 @@ def _convert_size(size_bytes): i = int(math.floor(math.log(size_bytes, 1024))) p = math.pow(1024, i) s = round(size_bytes / p, 2) - return "%s %s" % (s, size_name[i]), sign + return "{} {}".format(s, size_name[i]), sign def _get_tree_changes(self, a_entries, b_entries):