1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-06 22:25:38 +00:00

refactor string format to .format

This commit is contained in:
deadc0de6
2018-05-02 21:27:37 +02:00
parent f68ddeb06f
commit 445ec3e89c
9 changed files with 108 additions and 106 deletions

View File

@@ -23,8 +23,8 @@ class Dotfile:
self.trans = trans
def __str__(self):
return 'key:\"%s\", src:\"%s\", dst:\"%s\", link:\"%s\"' % (self.key, self.src,
self.dst, self.link)
msg = 'key:\"{}\", src:\"{}\", dst:\"{}\", link:\"{}\"'
return msg.format(self.key, self.src, self.dst, self.link)
def __eq__(self, other):
return self.__dict__ == other.__dict__