Skip to content

Commit 91b4284

Browse files
authored
Merge pull request Bitmessage#41 from navjotcis/codequalitykivy
mpybit flake and pylint fix
2 parents 410b35f + a46c81a commit 91b4284

1 file changed

Lines changed: 16 additions & 17 deletions

File tree

src/bitmessagekivy/mpybit.py

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def inbox_detail(self, msg_id, *args):
178178
def delete(self, data_index, instance, *args):
179179
"""Delete inbox mail from inbox listing."""
180180
sqlExecute(
181-
"UPDATE inbox SET folder = 'trash' WHERE msgid = ?;",str(
181+
"UPDATE inbox SET folder = 'trash' WHERE msgid = ?;", str(
182182
data_index))
183183
try:
184184
msg_count_objs = \
@@ -207,7 +207,7 @@ def delete(self, data_index, instance, *args):
207207
def archive(self, data_index, instance, *args):
208208
"""Archive inbox mail from inbox listing."""
209209
sqlExecute(
210-
"UPDATE inbox SET folder = 'trash' WHERE msgid = ?;",str(
210+
"UPDATE inbox SET folder = 'trash' WHERE msgid = ?;", str(
211211
data_index))
212212
self.ids.ml.remove_widget(instance.parent.parent)
213213
self.update_trash()
@@ -469,11 +469,11 @@ def send(self, navApp): # pylint: disable=too-many-statements, inconsistent-
469469
, fromaddress = ? , subject = ?\
470470
, message = ?, folder = 'sent'\
471471
WHERE ackdata = ?;",
472-
toAddress,
473-
fromAddress,
474-
subject,
475-
message,
476-
str(state.send_draft_mail))
472+
toAddress,
473+
fromAddress,
474+
subject,
475+
message,
476+
str(state.send_draft_mail))
477477
self.parent.parent.screens[15].clear_widgets()
478478
self.parent.parent.screens[15].add_widget(Draft())
479479
state.detailPageType = ''
@@ -828,7 +828,7 @@ def delete(self, data_index, instance, *args):
828828
state.all_count = str(int(state.all_count) - 1)
829829
sqlExecute(
830830
"UPDATE sent SET folder = 'trash' \
831-
WHERE ackdata = ?;",str(data_index))
831+
WHERE ackdata = ?;", str(data_index))
832832
self.ids.ml.remove_widget(instance.parent.parent)
833833
toast('Deleted')
834834
self.update_trash()
@@ -837,7 +837,7 @@ def archive(self, data_index, instance, *args):
837837
"""Archive sent mail from sent mail listing."""
838838
sqlExecute(
839839
"UPDATE sent SET folder = 'trash' \
840-
WHERE ackdata = ?;",str(data_index))
840+
WHERE ackdata = ?;", str(data_index))
841841
self.ids.ml.remove_widget(instance.parent.parent)
842842
self.update_trash()
843843

@@ -1430,7 +1430,7 @@ def init_ui(self, dt=0):
14301430
elif state.detailPageType == 'inbox':
14311431
data = sqlQuery(
14321432
"select toaddress, fromaddress, subject, message from inbox \
1433-
where msgid = ?;",str(state.mail_id))
1433+
where msgid = ?;", str(state.mail_id))
14341434
self.assign_mail_details(data)
14351435
state.kivyapp.set_mail_detail_header()
14361436

@@ -1462,11 +1462,11 @@ def delete_mail(self):
14621462
elif state.detailPageType == 'inbox':
14631463
sqlExecute(
14641464
"UPDATE inbox SET folder = 'trash' WHERE \
1465-
msgid = ?;",str(state.mail_id))
1465+
msgid = ?;", str(state.mail_id))
14661466
self.parent.screens[0].ids.ml.clear_widgets()
14671467
self.parent.screens[0].loadMessagelist(state.association)
14681468
elif state.detailPageType == 'draft':
1469-
sqlExecute("DELETE FROM sent WHERE ackdata = ?;",str(
1469+
sqlExecute("DELETE FROM sent WHERE ackdata = ?;", str(
14701470
state.mail_id))
14711471
msg_count_objs.draft_cnt.badge_text = str(int(state.draft_count) - 1)
14721472
state.draft_count = str(int(state.draft_count) - 1)
@@ -1490,7 +1490,7 @@ def inbox_reply(self):
14901490
"""Method used for replying inbox messages."""
14911491
data = sqlQuery(
14921492
"select toaddress, fromaddress, subject, message from inbox where \
1493-
msgid = ?;",str(state.mail_id))
1493+
msgid = ?;", str(state.mail_id))
14941494
composer_obj = self.parent.screens[2].children[0].ids
14951495
composer_obj.ti.text = data[0][0]
14961496
composer_obj.btn.text = data[0][0]
@@ -1709,7 +1709,7 @@ def draft_detail(self, ackdata, *args):
17091709

17101710
def delete_draft(self, data_index, instance, *args):
17111711
"""Method used to delete draft message permanently."""
1712-
sqlExecute("DELETE FROM sent WHERE ackdata = ?;",str(
1712+
sqlExecute("DELETE FROM sent WHERE ackdata = ?;", str(
17131713
data_index))
17141714
try:
17151715
msg_count_objs = \
@@ -1724,7 +1724,6 @@ def delete_draft(self, data_index, instance, *args):
17241724
self.ids.ml.remove_widget(instance.parent.parent)
17251725
toast('Deleted')
17261726

1727-
# pylint: disable=unused-variable
17281727
@staticmethod
17291728
def draft_msg(src_object):
17301729
"""Method used for saving draft mails."""
@@ -1879,11 +1878,11 @@ def swipe_delete(self, unique_id, folder, instance, *args):
18791878
"""Delete inbox mail from all mail listing listing."""
18801879
if folder == 'inbox':
18811880
sqlExecute(
1882-
"UPDATE inbox SET folder = 'trash' WHERE msgid = ?;",str(
1881+
"UPDATE inbox SET folder = 'trash' WHERE msgid = ?;", str(
18831882
unique_id))
18841883
else:
18851884
sqlExecute(
1886-
"UPDATE sent SET folder = 'trash' WHERE ackdata = ?;",str(
1885+
"UPDATE sent SET folder = 'trash' WHERE ackdata = ?;", str(
18871886
unique_id))
18881887
self.ids.ml.remove_widget(instance.parent.parent)
18891888
try:

0 commit comments

Comments
 (0)