mpybit flake8 fix

This commit is contained in:
lakshyacis 2019-09-07 20:11:42 +05:30
parent a52a63b16e
commit 8043adcff0
No known key found for this signature in database
GPG Key ID: D2C539C8EC63E9EB

View File

@ -126,7 +126,9 @@ class Inbox(Screen):
third_text = mail[3].replace('\n', ' ')
data.append({
'text': mail[4].strip(),
'secondary_text': mail[5][:50] + '........' if len(mail[5]) >= 50 else (mail[5] + ',' + mail[3].replace('\n', ''))[0:50] + '........',
'secondary_text': mail[5][:50] + '........' if len(
mail[5]) >= 50 else (
mail[5] + ',' + mail[3].replace('\n', ''))[0:50] + '........',
'receivedTime': mail[6]})
for item in data:
meny = ThreeLineAvatarIconListItem(
@ -138,7 +140,8 @@ class Inbox(Screen):
# item['secondary_text'][0].upper() >= 'A' and item[
# 'secondary_text'][0].upper() <= 'Z') else '!'
meny.add_widget(AvatarSampleWidget(
source='./images/text_images/{}.png'.format(avatarImageFirstLetter(item['secondary_text'].strip()))))
source='./images/text_images/{}.png'.format(
avatarImageFirstLetter(item['secondary_text'].strip()))))
meny.bind(on_press=partial(
self.inbox_detail, item['receivedTime']))
carousel = Carousel(direction='right')
@ -767,7 +770,9 @@ class Sent(Screen):
for mail in queryreturn:
self.data.append({
'text': mail[1].strip(),
'secondary_text': mail[2][:50] + '........' if len(mail[2]) >= 50 else (mail[2] + ',' + mail[3].replace('\n', ''))[0:50] + '........',
'secondary_text': mail[2][:50] + '........' if len(
mail[2]) >= 50 else (
mail[2] + ',' + mail[3].replace('\n', ''))[0:50] + '........',
'lastactiontime': mail[6]})
for item in self.data:
meny = ThreeLineAvatarIconListItem(
@ -776,7 +781,8 @@ class Sent(Screen):
theme_text_color='Custom',
text_color=NavigateApp().theme_cls.primary_color)
meny.add_widget(AvatarSampleWidget(
source='./images/text_images/{}.png'.format(avatarImageFirstLetter(item['secondary_text'].strip()))))
source='./images/text_images/{}.png'.format(
avatarImageFirstLetter(item['secondary_text'].strip()))))
meny.bind(on_press=partial(
self.sent_detail, item['lastactiontime']))
carousel = Carousel(direction='right')
@ -904,7 +910,9 @@ class Trash(Screen):
for item in trash_data:
meny = ThreeLineAvatarIconListItem(
text=item[1],
secondary_text=item[2][:50] + '........' if len(item[2]) >= 50 else (item[2] + ',' + item[3].replace('\n', ''))[0:50] + '........',
secondary_text=item[2][:50] + '........' if len(
item[2]) >= 50 else (
item[2] + ',' + item[3].replace('\n', ''))[0:50] + '........',
theme_text_color='Custom',
text_color=NavigateApp().theme_cls.primary_color)
img_latter = './images/text_images/{}.png'.format(
@ -1893,11 +1901,14 @@ class Allmails(Screen):
for item in all_mails:
meny = ThreeLineAvatarIconListItem(
text=item[1],
secondary_text=item[2][:50] + '........' if len(item[2]) >= 50 else (item[2] + ',' + item[3].replace('\n', ''))[0:50] + '........',
secondary_text=item[2][:50] + '........' if len(
item[2]) >= 50 else (
item[2] + ',' + item[3].replace('\n', ''))[0:50] + '........',
theme_text_color='Custom',
text_color=NavigateApp().theme_cls.primary_color)
meny.add_widget(AvatarSampleWidget(
source='./images/text_images/{}.png'.format(avatarImageFirstLetter(item[2].strip()))))
source='./images/text_images/{}.png'.format(
avatarImageFirstLetter(item[2].strip()))))
meny.bind(on_press=partial(
self.mail_detail, item[5], item[4]))
carousel = Carousel(direction='right')