Skip to content

Commit 5e697af

Browse files
committed
Code quality
1 parent f6f5273 commit 5e697af

2 files changed

Lines changed: 11 additions & 12 deletions

File tree

src/bitmessagecli.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# -*- coding: utf-8 -*-
33
# pylint: disable=too-many-lines,global-statement,too-many-branches,too-many-statements,inconsistent-return-statements
44
# pylint: disable=too-many-nested-blocks,too-many-locals,protected-access,too-many-arguments,too-many-function-args
5-
# pylint: disable=no-member
5+
# pylint: disable=no-member,superfluous-parens
66
"""
77
Created by Adam Melton (.dok) referenceing https://bitmessage.org/wiki/API_Reference for API documentation
88
Distributed under the MIT/X11 software license. See http://www.opensource.org/licenses/mit-license.php.
@@ -16,16 +16,15 @@
1616
import datetime
1717
import imghdr
1818
import json
19-
import ntpath
2019
import os
2120
import socket
2221
import sys
2322
import time
24-
2523
from six.moves import input as raw_input
2624
from six.moves import xmlrpc_client as xmlrpclib
2725

28-
from bmconfigparser import config
26+
import ntpath
27+
from pybitmessage.bmconfigparser import config
2928

3029

3130
api = ''

src/class_addressGenerator.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,8 @@ def run(self):
221221
))
222222

223223
elif command in (
224-
'createDeterministicAddresses', 'createChan',
225-
'getDeterministicAddress', 'joinChan'
224+
'createDeterministicAddresses', 'createChan',
225+
'getDeterministicAddress', 'joinChan'
226226
):
227227
if not deterministicPassphrase:
228228
self.logger.warning(
@@ -268,8 +268,8 @@ def run(self):
268268
ripe = highlevelcrypto.to_ripe(
269269
potentialPubSigningKey, potentialPubEncryptionKey)
270270
if (
271-
ripe[:numberOfNullBytesDemandedOnFrontOfRipeHash]
272-
== b'\x00' * numberOfNullBytesDemandedOnFrontOfRipeHash
271+
ripe[:numberOfNullBytesDemandedOnFrontOfRipeHash]
272+
== b'\x00' * numberOfNullBytesDemandedOnFrontOfRipeHash
273273
):
274274
break
275275

@@ -303,9 +303,9 @@ def run(self):
303303
saveAddressToDisk = False
304304

305305
if saveAddressToDisk and live and self.save_address(
306-
addressVersionNumber, streamNumber, ripe, label,
307-
potentialPrivSigningKey, potentialPrivEncryptionKey,
308-
nonceTrialsPerByte, payloadLengthExtraBytes
306+
addressVersionNumber, streamNumber, ripe, label,
307+
potentialPrivSigningKey, potentialPrivEncryptionKey,
308+
nonceTrialsPerByte, payloadLengthExtraBytes
309309
):
310310
if command in ('createChan', 'joinChan'):
311311
config.set(address, 'chan', 'true')
@@ -326,7 +326,7 @@ def run(self):
326326

327327
# Done generating addresses.
328328
if command in (
329-
'createDeterministicAddresses', 'createChan', 'joinChan'
329+
'createDeterministicAddresses', 'createChan', 'joinChan'
330330
):
331331
queues.apiAddressGeneratorReturnQueue.put(
332332
listOfNewAddressesToSendOutThroughTheAPI)

0 commit comments

Comments
 (0)