Replace concatenation with f-strings

Use f-strings instead concatenation to make it more readable and faster.

Change-Id: I208bd44c063756be85c836e1b30290e6c09f2101
This commit is contained in:
wangzihao 2020-11-02 16:36:34 +08:00 committed by Stephen Finucane
parent a2122e7432
commit a96ee02b24
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ class HeaderView(object):
self.header = header
def __call__(self, model):
return str(self.header) + "\n" + str(model)
return f'{self.header}\n{model}'
class TitledView(HeaderView):