diff --git a/src/bitmessageqt/bitmessageui.py b/src/bitmessageqt/bitmessageui.py index bee8fd571a..e71587cafe 100644 --- a/src/bitmessageqt/bitmessageui.py +++ b/src/bitmessageqt/bitmessageui.py @@ -25,17 +25,34 @@ def _fromUtf8(s): try: _encoding = QtGui.QApplication.UnicodeUTF8 - def _translate(context, text, disambig, encoding=QtCore.QCoreApplication.CodecForTr, n=None): + # pylint: disable=unused-argument + def _translate(context, text, disambig, + encoding=QtCore.QCoreApplication.CodecForTr, n=None): if n is None: - return QtGui.QApplication.translate(context, text, disambig, _encoding) + return QtGui.QApplication.translate(context, + text, + disambig, + _encoding) else: - return QtGui.QApplication.translate(context, text, disambig, _encoding, n) + return QtGui.QApplication.translate(context, + text, + disambig, + _encoding, + n) except AttributeError: - def _translate(context, text, disambig, encoding=QtCore.QCoreApplication.CodecForTr, n=None): + # pylint: disable=unused-argument + def _translate(context, text, disambig, + encoding=QtCore.QCoreApplication.CodecForTr, n=None): if n is None: - return QtGui.QApplication.translate(context, text, disambig) + return QtGui.QApplication.translate(context, + text, + disambig) else: - return QtGui.QApplication.translate(context, text, disambig, QtCore.QCoreApplication.CodecForTr, n) + return QtGui.QApplication.translate(context, + text, + disambig, + QtCore.QCoreApplication.CodecForTr, + n) class Ui_MainWindow(object): @@ -44,7 +61,8 @@ def setupUi(self, MainWindow): MainWindow.resize(885, 580) icon = QtGui.QIcon() icon.addPixmap( - QtGui.QPixmap(_fromUtf8(":/newPrefix/images/can-icon-24px.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off + QtGui.QPixmap(_fromUtf8(":/newPrefix/images/can-icon-24px.png")), + QtGui.QIcon.Normal, QtGui.QIcon.Off ) MainWindow.setWindowIcon(icon) MainWindow.setTabShape(QtGui.QTabWidget.Rounded) @@ -53,7 +71,8 @@ def setupUi(self, MainWindow): self.gridLayout_10 = QtGui.QGridLayout(self.centralwidget) self.gridLayout_10.setObjectName(_fromUtf8("gridLayout_10")) self.tabWidget = QtGui.QTabWidget(self.centralwidget) - sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, + QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.tabWidget.sizePolicy().hasHeightForWidth()) diff --git a/src/bitmessageqt/blacklist.py b/src/bitmessageqt/blacklist.py index 2cc163c380..d1f339a88e 100644 --- a/src/bitmessageqt/blacklist.py +++ b/src/bitmessageqt/blacklist.py @@ -1,4 +1,7 @@ -from PyQt4 import QtCore, QtGui +""" +Blacklist / whitelist administration UI +""" +from PyQt4 import QtCore, QtGui # pylint: disable=import-error import widgets from addresses import addBMIfNotPresent @@ -55,12 +58,12 @@ def click_radioButtonWhitelist(self): self.rerenderBlackWhiteList() def click_pushButtonAddBlacklist(self): - self.NewBlacklistDialogInstance = AddAddressDialog(self) - if self.NewBlacklistDialogInstance.exec_(): - if self.NewBlacklistDialogInstance.labelAddressCheck.text() == \ + NewBlacklistDialogInstance = AddAddressDialog(self) + if NewBlacklistDialogInstance.exec_(): + if NewBlacklistDialogInstance.labelAddressCheck.text() == \ _translate("MainWindow", "Address is valid."): address = addBMIfNotPresent(str( - self.NewBlacklistDialogInstance.lineEditAddress.text())) + NewBlacklistDialogInstance.lineEditAddress.text())) # First we must check to see if the address is already in the # address book. The user cannot add it again or else it will # cause problems when updating and deleting the entry. @@ -74,7 +77,7 @@ def click_pushButtonAddBlacklist(self): self.tableWidgetBlacklist.setSortingEnabled(False) self.tableWidgetBlacklist.insertRow(0) newItem = QtGui.QTableWidgetItem(unicode( - self.NewBlacklistDialogInstance.lineEditLabel.text().toUtf8(), 'utf-8')) + NewBlacklistDialogInstance.lineEditLabel.text().toUtf8(), 'utf-8')) newItem.setIcon(avatarize(address)) self.tableWidgetBlacklist.setItem(0, 0, newItem) newItem = QtGui.QTableWidgetItem(address) @@ -82,7 +85,7 @@ def click_pushButtonAddBlacklist(self): QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled) self.tableWidgetBlacklist.setItem(0, 1, newItem) self.tableWidgetBlacklist.setSortingEnabled(True) - t = (str(self.NewBlacklistDialogInstance.lineEditLabel.text().toUtf8()), address, True) + t = (str(NewBlacklistDialogInstance.lineEditLabel.text().toUtf8()), address, True) if config.get('bitmessagesettings', 'blackwhitelist') == 'black': sql = '''INSERT INTO blacklist VALUES (?,?,?)''' else: diff --git a/src/bitmessageqt/dialogs.py b/src/bitmessageqt/dialogs.py index dc31e26697..cdb5e06221 100644 --- a/src/bitmessageqt/dialogs.py +++ b/src/bitmessageqt/dialogs.py @@ -2,7 +2,7 @@ Custom dialog classes """ # pylint: disable=too-few-public-methods -from PyQt4 import QtGui +from PyQt4 import QtGui # pylint: disable=import-error import paths import widgets diff --git a/src/bitmessageqt/foldertree.py b/src/bitmessageqt/foldertree.py index c50b7d3d47..6984f094a7 100644 --- a/src/bitmessageqt/foldertree.py +++ b/src/bitmessageqt/foldertree.py @@ -6,7 +6,7 @@ from cgi import escape -from PyQt4 import QtCore, QtGui +from PyQt4 import QtCore, QtGui # pylint: disable=import-error from bmconfigparser import config from helper_sql import sqlExecute, sqlQuery @@ -232,8 +232,11 @@ def _setup(self, parent, pos): def _getLabel(self): if self.address is None: - return unicode(_translate( - "MainWindow", "All accounts").toUtf8(), 'utf-8', 'ignore') + # pylint: disable=no-member + return unicode(_translate("MainWindow", + "All accounts").toUtf8(), + 'utf-8', + 'ignore') else: try: return unicode( diff --git a/src/bitmessageqt/languagebox.py b/src/bitmessageqt/languagebox.py index 34f96b02a7..5e389d33c3 100644 --- a/src/bitmessageqt/languagebox.py +++ b/src/bitmessageqt/languagebox.py @@ -3,7 +3,7 @@ import glob import os -from PyQt4 import QtCore, QtGui +from PyQt4 import QtCore, QtGui # pylint: disable=import-error import paths from bmconfigparser import config diff --git a/src/depends.py b/src/depends.py index 050966fd6c..6ddff80b57 100755 --- a/src/depends.py +++ b/src/depends.py @@ -188,7 +188,7 @@ def try_import(module, log_extra=False): logger.error( 'On %s, try running "%s %s" as root.', dist, PACKAGE_MANAGER[dist], PACKAGES[module][dist]) - return False + return None def check_ripemd160(): @@ -274,6 +274,7 @@ def check_openssl(): if sys.platform == 'win32': paths = ['libeay32.dll'] if getattr(sys, 'frozen', False): + # pylint: disable=no-member paths.insert(0, os.path.join(sys._MEIPASS, 'libeay32.dll')) else: paths = ['libcrypto.so', 'libcrypto.so.1.0.0'] diff --git a/src/fallback/umsgpack/umsgpack.py b/src/fallback/umsgpack/umsgpack.py index ff11fc2c4e..9378cbe506 100644 --- a/src/fallback/umsgpack/umsgpack.py +++ b/src/fallback/umsgpack/umsgpack.py @@ -410,8 +410,6 @@ def _pack2(obj, fp, **options): >>> umsgpack.pack({u"compact": True, u"schema": 0}, f) >>> """ - global compatibility - ext_handlers = options.get("ext_handlers") if obj is None: @@ -480,8 +478,6 @@ def _pack3(obj, fp, **options): >>> umsgpack.pack({u"compact": True, u"schema": 0}, f) >>> """ - global compatibility - ext_handlers = options.get("ext_handlers") if obj is None: @@ -665,7 +661,6 @@ def _unpack_string(code, fp, options): raise Exception("logic error, not string: 0x%02x" % ord(code)) # Always return raw bytes in compatibility mode - global compatibility if compatibility: return _read_except(fp, length) diff --git a/src/network/bmproto.py b/src/network/bmproto.py index aa830cf5aa..3512d88154 100644 --- a/src/network/bmproto.py +++ b/src/network/bmproto.py @@ -67,6 +67,25 @@ def __init__(self, address=None, sock=None): # track port check requests, only allow one per connection # completely disable port checks for now self.portCheckRequested = True + self.payloadLength = 0 + self.payloadOffset = 0 + self.invalid = False + self.timeOffset = 0 + self.verackSent = False + self.verackReceived = False + self.payload = None + self.isSSL = False + self.remoteProtocolVersion = 0 + self.nonce = 0 + self.peerNode = None + self.streams = None + self.timestamp = 0 + self.object = None + self.services = None + self.sockNode = None + self.magic = None + self.checksum = None + self.command = None def bm_proto_reset(self): """Reset the bitmessage object parser""" diff --git a/src/network/http.py b/src/network/http.py deleted file mode 100644 index 8a49e760c8..0000000000 --- a/src/network/http.py +++ /dev/null @@ -1,89 +0,0 @@ -import socket - -from .advanceddispatcher import AdvancedDispatcher -from . import asyncore_pollchoose as asyncore -from .proxy import ProxyError -from .socks5 import Socks5Connection, Socks5Resolver -from .socks4a import Socks4aConnection, Socks4aResolver - - -class HttpError(ProxyError): - pass - - -class HttpConnection(AdvancedDispatcher): - def __init__(self, host, path="/"): # pylint: disable=redefined-outer-name - AdvancedDispatcher.__init__(self) - self.path = path - self.destination = (host, 80) - self.create_socket(socket.AF_INET, socket.SOCK_STREAM) - self.connect(self.destination) - print("connecting in background to %s:%i" % self.destination) - - def state_init(self): - self.append_write_buf( - "GET %s HTTP/1.1\r\nHost: %s\r\nConnection: close\r\n\r\n" % ( - self.path, self.destination[0])) - print("Sending %ib" % len(self.write_buf)) - self.set_state("http_request_sent", 0) - return False - - def state_http_request_sent(self): - if self.read_buf: - print("Received %ib" % len(self.read_buf)) - self.read_buf = b"" - if not self.connected: - self.set_state("close", 0) - return False - - -class Socks5HttpConnection(Socks5Connection, HttpConnection): - def __init__(self, host, path="/"): # pylint: disable=super-init-not-called, redefined-outer-name - self.path = path - Socks5Connection.__init__(self, address=(host, 80)) - - def state_socks_handshake_done(self): - HttpConnection.state_init(self) - return False - - -class Socks4aHttpConnection(Socks4aConnection, HttpConnection): - def __init__(self, host, path="/"): # pylint: disable=super-init-not-called, redefined-outer-name - Socks4aConnection.__init__(self, address=(host, 80)) - self.path = path - - def state_socks_handshake_done(self): - HttpConnection.state_init(self) - return False - - -if __name__ == "__main__": - # initial fill - for host in ("bootstrap8080.bitmessage.org", "bootstrap8444.bitmessage.org"): - proxy = Socks5Resolver(host=host) - while asyncore.socket_map: - print("loop %s, len %i" % (proxy.state, len(asyncore.socket_map))) - asyncore.loop(timeout=1, count=1) - proxy.resolved() - - proxy = Socks4aResolver(host=host) - while asyncore.socket_map: - print("loop %s, len %i" % (proxy.state, len(asyncore.socket_map))) - asyncore.loop(timeout=1, count=1) - proxy.resolved() - - for host in ("bitmessage.org",): - direct = HttpConnection(host) - while asyncore.socket_map: - # print "loop, state = %s" % (direct.state) - asyncore.loop(timeout=1, count=1) - - proxy = Socks5HttpConnection(host) - while asyncore.socket_map: - # print "loop, state = %s" % (proxy.state) - asyncore.loop(timeout=1, count=1) - - proxy = Socks4aHttpConnection(host) - while asyncore.socket_map: - # print "loop, state = %s" % (proxy.state) - asyncore.loop(timeout=1, count=1) diff --git a/src/network/httpd.py b/src/network/httpd.py deleted file mode 100644 index 8b5153239a..0000000000 --- a/src/network/httpd.py +++ /dev/null @@ -1,161 +0,0 @@ -""" -src/network/httpd.py -======================= -""" -import asyncore -import socket - -from .tls import TLSHandshake - - -class HTTPRequestHandler(asyncore.dispatcher): - """Handling HTTP request""" - response = """HTTP/1.0 200 OK\r - Date: Sun, 23 Oct 2016 18:02:00 GMT\r - Content-Type: text/html; charset=UTF-8\r - Content-Encoding: UTF-8\r - Content-Length: 136\r - Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT\r - Server: Apache/1.3.3.7 (Unix) (Red-Hat/Linux)\r - ETag: "3f80f-1b6-3e1cb03b"\r - Accept-Ranges: bytes\r - Connection: close\r - \r - - - An Example Page - - - Hello World, this is a very simple HTML document. - - """ - - def __init__(self, sock): - if '_map' not in self.__dict__: - asyncore.dispatcher.__init__(self, sock) - self.inbuf = "" - self.ready = True - self.busy = False - self.respos = 0 - - def handle_close(self): - self.close() - - def readable(self): - return self.ready - - def writable(self): - return self.busy - - def handle_read(self): - self.inbuf += self.recv(8192) - if self.inbuf[-4:] == "\r\n\r\n": - self.busy = True - self.ready = False - self.inbuf = "" - elif self.inbuf == "": - pass - - def handle_write(self): - if self.busy and self.respos < len(HTTPRequestHandler.response): - written = 0 - written = self.send(HTTPRequestHandler.response[self.respos:65536]) - self.respos += written - elif self.busy: - self.busy = False - self.ready = True - self.close() - - -class HTTPSRequestHandler(HTTPRequestHandler, TLSHandshake): - """Handling HTTPS request""" - def __init__(self, sock): - if '_map' not in self.__dict__: - asyncore.dispatcher.__init__(self, sock) # pylint: disable=non-parent-init-called - # self.tlsDone = False - TLSHandshake.__init__( - self, - sock=sock, - certfile='/home/shurdeek/src/PyBitmessage/src/sslkeys/cert.pem', - keyfile='/home/shurdeek/src/PyBitmessage/src/sslkeys/key.pem', - server_side=True) - HTTPRequestHandler.__init__(self, sock) - - def handle_connect(self): - TLSHandshake.handle_connect(self) - - def handle_close(self): - if self.tlsDone: - HTTPRequestHandler.close(self) - else: - TLSHandshake.close(self) - - def readable(self): - if self.tlsDone: - return HTTPRequestHandler.readable(self) - return TLSHandshake.readable(self) - - def handle_read(self): - if self.tlsDone: - HTTPRequestHandler.handle_read(self) - else: - TLSHandshake.handle_read(self) - - def writable(self): - if self.tlsDone: - return HTTPRequestHandler.writable(self) - return TLSHandshake.writable(self) - - def handle_write(self): - if self.tlsDone: - HTTPRequestHandler.handle_write(self) - else: - TLSHandshake.handle_write(self) - - -class HTTPServer(asyncore.dispatcher): - """Handling HTTP Server""" - port = 12345 - - def __init__(self): - if '_map' not in self.__dict__: - asyncore.dispatcher.__init__(self) - self.create_socket(socket.AF_INET, socket.SOCK_STREAM) - self.set_reuse_addr() - self.bind(('127.0.0.1', HTTPServer.port)) - self.connections = 0 - self.listen(5) - - def handle_accept(self): - pair = self.accept() - if pair is not None: - sock, addr = pair - # print 'Incoming connection from %s' % repr(addr) - self.connections += 1 - # if self.connections % 1000 == 0: - # print "Processed %i connections, active %i" % (self.connections, len(asyncore.socket_map)) - HTTPRequestHandler(sock) - - -class HTTPSServer(HTTPServer): - """Handling HTTPS Server""" - port = 12345 - - def __init__(self): - if '_map' not in self.__dict__: - HTTPServer.__init__(self) - - def handle_accept(self): - pair = self.accept() - if pair is not None: - sock, addr = pair - # print 'Incoming connection from %s' % repr(addr) - self.connections += 1 - # if self.connections % 1000 == 0: - # print "Processed %i connections, active %i" % (self.connections, len(asyncore.socket_map)) - HTTPSRequestHandler(sock) - - -if __name__ == "__main__": - client = HTTPSServer() - asyncore.loop() diff --git a/src/network/https.py b/src/network/https.py deleted file mode 100644 index a5cc2ac6cb..0000000000 --- a/src/network/https.py +++ /dev/null @@ -1,71 +0,0 @@ -import asyncore - -from .http import HTTPClient -from .tls import TLSHandshake - -""" -self.sslSock = ssl.wrap_socket( - self.sock, - keyfile=os.path.join(paths.codePath(), 'sslkeys', 'key.pem'), - certfile=os.path.join(paths.codePath(), 'sslkeys', 'cert.pem'), - server_side=not self.initiatedConnection, - ssl_version=ssl.PROTOCOL_TLSv1, - do_handshake_on_connect=False, - ciphers='AECDH-AES256-SHA') -""" - - -class HTTPSClient(HTTPClient, TLSHandshake): - def __init__(self, host, path): - if '_map' not in self.__dict__: - asyncore.dispatcher.__init__(self) - self.tlsDone = False - """ - TLSHandshake.__init__( - self, - address=(host, 443), - certfile='/home/shurdeek/src/PyBitmessage/sslsrc/keys/cert.pem', - keyfile='/home/shurdeek/src/PyBitmessage/src/sslkeys/key.pem', - server_side=False, - ciphers='AECDH-AES256-SHA') - """ - HTTPClient.__init__(self, host, path, connect=False) - TLSHandshake.__init__(self, address=(host, 443), server_side=False) - - def handle_connect(self): - TLSHandshake.handle_connect(self) - - def handle_close(self): - if self.tlsDone: - HTTPClient.close(self) - else: - TLSHandshake.close(self) - - def readable(self): - if self.tlsDone: - return HTTPClient.readable(self) - else: - return TLSHandshake.readable(self) - - def handle_read(self): - if self.tlsDone: - HTTPClient.handle_read(self) - else: - TLSHandshake.handle_read(self) - - def writable(self): - if self.tlsDone: - return HTTPClient.writable(self) - else: - return TLSHandshake.writable(self) - - def handle_write(self): - if self.tlsDone: - HTTPClient.handle_write(self) - else: - TLSHandshake.handle_write(self) - - -if __name__ == "__main__": - client = HTTPSClient('anarchy.economicsofbitcoin.com', '/') - asyncore.loop() diff --git a/src/network/tls.py b/src/network/tls.py index 2ffdbaf2d8..a1059d2b6a 100644 --- a/src/network/tls.py +++ b/src/network/tls.py @@ -57,6 +57,7 @@ def __init__(self, _=None, sock=None, certfile=None, keyfile=None, self.tlsDone = False self.tlsVersion = "N/A" self.isSSL = False + self.sslSocket = None def state_tls_init(self): """Prepare sockets for TLS handshake""" diff --git a/src/plugins/indicator_libmessaging.py b/src/plugins/indicator_libmessaging.py index 7dc4a48b59..c73b06adbe 100644 --- a/src/plugins/indicator_libmessaging.py +++ b/src/plugins/indicator_libmessaging.py @@ -5,6 +5,7 @@ # flake8: noqa:E402 # pycodestyle: disable=E402 +# pylint: disable=import-error,no-name-in-module import gi gi.require_version('MessagingMenu', '1.0') from gi.repository import MessagingMenu diff --git a/src/plugins/menu_qrcode.py b/src/plugins/menu_qrcode.py index ea322a4940..e04acd706a 100644 --- a/src/plugins/menu_qrcode.py +++ b/src/plugins/menu_qrcode.py @@ -6,7 +6,7 @@ import urllib import qrcode -from PyQt4 import QtCore, QtGui +from PyQt4 import QtCore, QtGui # pylint: disable=import-error from pybitmessage.tr import _translate diff --git a/src/plugins/notification_notify2.py b/src/plugins/notification_notify2.py index f851737da1..e5e7e6e559 100644 --- a/src/plugins/notification_notify2.py +++ b/src/plugins/notification_notify2.py @@ -5,7 +5,7 @@ import gi gi.require_version('Notify', '0.7') -from gi.repository import Notify # noqa:E402 +from gi.repository import Notify # noqa:E402 pylint: disable=import-error Notify.init('pybitmessage') diff --git a/src/plugins/proxyconfig_stem.py b/src/plugins/proxyconfig_stem.py index 25f75f697f..f770e3a337 100644 --- a/src/plugins/proxyconfig_stem.py +++ b/src/plugins/proxyconfig_stem.py @@ -11,6 +11,7 @@ * otherwise use stem's 'BEST' version and save onion keys to the new section using *onionhostname* as name for future use. """ +# pylint: disable=import-error import logging import os import random diff --git a/src/plugins/sound_canberra.py b/src/plugins/sound_canberra.py index 9fea8197c8..69ec77863a 100644 --- a/src/plugins/sound_canberra.py +++ b/src/plugins/sound_canberra.py @@ -3,7 +3,7 @@ Sound theme plugin using pycanberra """ -import pycanberra +import pycanberra # pylint: disable=import-error from pybitmessage.bitmessageqt import sound _canberra = pycanberra.Canberra() diff --git a/src/plugins/sound_gstreamer.py b/src/plugins/sound_gstreamer.py index 8f3606dd87..002d106074 100644 --- a/src/plugins/sound_gstreamer.py +++ b/src/plugins/sound_gstreamer.py @@ -2,6 +2,7 @@ """ Sound notification plugin using gstreamer """ +# pylint: disable=import-error,no-name-in-module import gi gi.require_version('Gst', '1.0') from gi.repository import Gst # noqa: E402 diff --git a/src/plugins/sound_playfile.py b/src/plugins/sound_playfile.py index c6b70f66b1..26db0e2840 100644 --- a/src/plugins/sound_playfile.py +++ b/src/plugins/sound_playfile.py @@ -22,7 +22,8 @@ def _subprocess(*args): def connect_plugin(sound_file): """This function implements the entry point.""" - global play_cmd # pylint: disable=global-statement + # pylint: disable=global-statement,global-variable-not-assigned + global play_cmd ext = os.path.splitext(sound_file)[-1] try: diff --git a/src/pyelliptic/openssl.py b/src/pyelliptic/openssl.py index 851dfa1525..6cc90fd43c 100644 --- a/src/pyelliptic/openssl.py +++ b/src/pyelliptic/openssl.py @@ -786,6 +786,7 @@ def loadOpenSSL(): elif 'win32' in sys.platform or 'win64' in sys.platform: libdir.append(path.join(sys._MEIPASS, 'libeay32.dll')) else: + # pylint: disable=no-member libdir.extend([ path.join(sys._MEIPASS, 'libcrypto.so'), path.join(sys._MEIPASS, 'libssl.so'), diff --git a/src/pyelliptic/tests/test_openssl.py b/src/pyelliptic/tests/test_openssl.py index cb78927760..36070a26ff 100644 --- a/src/pyelliptic/tests/test_openssl.py +++ b/src/pyelliptic/tests/test_openssl.py @@ -8,11 +8,7 @@ except ImportError: from pybitmessage.pyelliptic import OpenSSL -try: - OpenSSL.BN_bn2binpad - have_pad = True -except AttributeError: - have_pad = None +have_pad = hasattr(OpenSSL, 'BN_bn2binpad') class TestOpenSSL(unittest.TestCase): diff --git a/src/shared.py b/src/shared.py index 809e8b8381..afb614dda5 100644 --- a/src/shared.py +++ b/src/shared.py @@ -15,7 +15,7 @@ import sys from binascii import hexlify -from six.moves.reprlib import repr # pylint: disable=redefined-builtin +from six.moves.reprlib import repr # pylint: disable=redefined-builtin,import-error # Project imports. import highlevelcrypto diff --git a/tests-kivy.py b/tests-kivy.py index 9bc08880e6..3ddc962e5f 100644 --- a/tests-kivy.py +++ b/tests-kivy.py @@ -22,7 +22,7 @@ def unittest_discover(): if in_docker: try: os.mkdir("../out") - except FileExistsError: # noqa:F821 + except FileExistsError: # noqa:F821 pylint: disable=undefined-variable pass ffmpeg = subprocess.Popen([ # pylint: disable=consider-using-with @@ -38,7 +38,7 @@ def unittest_discover(): if in_docker: ffmpeg.terminate() try: - ffmpeg.wait(10) - except subprocess.TimeoutExpired: + ffmpeg.wait(10) # pylint: disable=too-many-function-args + except subprocess.TimeoutExpired: # pylint: disable=no-member ffmpeg.kill() sys.exit(not result.wasSuccessful())