From fce38bce7b67c65331ce407f8a09650617638610 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Sat, 6 Jan 2018 20:15:32 -0800 Subject: [PATCH] Refactoring: reduce method length and use unicode string --- dvc/command/fsck.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dvc/command/fsck.py b/dvc/command/fsck.py index 68f90b7ed..6db5688d1 100644 --- a/dvc/command/fsck.py +++ b/dvc/command/fsck.py @@ -29,7 +29,7 @@ class CmdFsck(CmdBase): def print_fsck(self, caches, dvc_files, files_and_stages): for file in dvc_files: - print('File {}:'.format(file)) + print(u'File {}:'.format(file)) full_path = os.path.join(self.project.root_dir, file) if self.args.physical: @@ -51,10 +51,9 @@ class CmdFsck(CmdBase): print(u' Actual mtime: {}'.format(mtime)) for stage, dep in files_and_stages.get(file, []): - direction = type(dep).__name__ stage_error = '!!!' if dep.md5 and hardlink_md5 and dep.md5 != hardlink_md5 else '' print(u' Stage file: {}'.format(stage.dvc_path)) - print(u' Type: {}'.format(direction)) + print(u' Type: {}'.format(type(dep).__name__)) print(u' Checksum: {} {}'.format(dep.md5, stage_error)) print(u' Use cache: {}'.format(str(dep.use_cache).lower())) pass