From 7db810d5af44543749cd6e19443cd6ad5bcab771 Mon Sep 17 00:00:00 2001 From: George McCandless <5fk7echy8@riseup.net> Date: Tue, 8 Oct 2019 22:43:28 +0000 Subject: [PATCH] pylint fixes. --- src/bitmessageqt/__init__.py | 8 +++++--- src/bitmessageqt/messageview.py | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index 93adcd28..c7fa6390 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -1955,18 +1955,20 @@ class MyForm(settingsmixin.SMainWindow): self.ui.comboBoxSendFrom.setCurrentIndex(0) def click_pushButtonAttach(self): + """Launch a file picker and append to the current message the base64-encoded contents of the chosen file.""" filename = QtGui.QFileDialog.getOpenFileName(self, "Attach File") if filename: f = open(filename, 'rb') data = f.read() f.close() data_b64 = base64.b64encode(data) - html_data = '' + os.path.basename(unicode(filename)) + '' + html_data = '' \ + + os.path.basename(unicode(filename)) + '' if self.ui.tabWidgetSend.currentIndex() == self.ui.tabWidgetSend.indexOf(self.ui.sendDirect): - #send direct message + # send direct message self.ui.textEditMessage.insertPlainText(html_data) else: - #send broadcast message + # send broadcast message self.ui.textEditMessageBroadcast.insertPlainText(html_data) def click_pushButtonSend(self): diff --git a/src/bitmessageqt/messageview.py b/src/bitmessageqt/messageview.py index 8c7edcbe..7a6432b0 100644 --- a/src/bitmessageqt/messageview.py +++ b/src/bitmessageqt/messageview.py @@ -5,7 +5,8 @@ src/bitmessageqt/messageview.py """ from PyQt4 import QtCore, QtGui -import re, base64 +import re +import base64 from safehtmlparser import SafeHTMLParser