From f4c7ac56047d60beae7c3ed7a01e26da40a02dd4 Mon Sep 17 00:00:00 2001 From: lakshyacis Date: Mon, 7 Oct 2019 19:47:40 +0530 Subject: [PATCH] helper_inbox pylint fixes --- src/helper_inbox.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/helper_inbox.py b/src/helper_inbox.py index 7cb860dc..654dd59d 100644 --- a/src/helper_inbox.py +++ b/src/helper_inbox.py @@ -1,7 +1,7 @@ """Helper Inbox performs inbox messages related operations""" -from helper_sql import sqlExecute, sqlQuery import queues +from helper_sql import sqlExecute, sqlQuery def insert(t): @@ -13,11 +13,13 @@ def insert(t): def trash(msgid): + """Mark a message in the `inbox` as `trash`""" sqlExecute('''UPDATE inbox SET folder='trash' WHERE msgid=?''', msgid) queues.UISignalQueue.put(('removeInboxRowByMsgid', msgid)) def isMessageAlreadyInInbox(sigHash): + """Check for previous instances of this message""" queryReturn = sqlQuery( '''SELECT COUNT(*) FROM inbox WHERE sighash=?''', sigHash) return queryReturn[0][0] != 0