Don't use fstrings to keep support with python<3.7

fixes #131
This commit is contained in:
Ivan Habunek 2019-09-23 16:51:04 +02:00
parent cf78cd20ac
commit d595cc5140
No known key found for this signature in database
GPG Key ID: CDBD63C43A30BB95
2 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@ class Header(urwid.WidgetWrap):
self.text = urwid.Text("")
self.cols = urwid.Columns([
("pack", urwid.Text(('header_bold', 'toot'))),
("pack", urwid.Text(('header', f' | {user.username}@{app.instance}'))),
("pack", urwid.Text(('header', ' | {}@{}'.format(user.username, app.instance)))),
("pack", self.text),
])

View File

@ -16,9 +16,9 @@ class StatusComposer(urwid.Frame):
self.in_reply_to = in_reply_to
text, edit_pos = '', None
if in_reply_to is not None:
text = f'@{in_reply_to.account} '
text = '@{} '.format(in_reply_to.account)
edit_pos = len(text)
mentions = [f'@{m["acct"]}' for m in in_reply_to.mentions]
mentions = ['@{}'.format(m["acct"]) for m in in_reply_to.mentions]
if mentions:
text += '\n\n{}'.format(' '.join(mentions))
self.content_edit = EditBox(edit_text=text, edit_pos=edit_pos,