Browse Source

Imported packages sequencing and formatting 2

v0.6
lakshyacis 2 years ago
parent
commit
6139efc377
No known key found for this signature in database GPG Key ID: D2C539C8EC63E9EB
  1. 2
      src/messagetypes/__init__.py
  2. 1
      src/network/announcethread.py
  3. 10
      src/network/bmproto.py
  4. 2
      src/network/receivequeuethread.py
  5. 2
      src/network/socks4a.py
  6. 5
      src/network/tls.py
  7. 2
      src/plugins/menu_qrcode.py
  8. 2
      src/plugins/proxyconfig_stem.py
  9. 3
      src/plugins/sound_canberra.py
  10. 4
      src/pyelliptic/__init__.py
  11. 4
      src/pyelliptic/openssl.py
  12. 6
      src/storage/filesystem.py
  13. 4
      src/storage/sqlite.py

2
src/messagetypes/__init__.py

@ -1,6 +1,6 @@
import logging
from importlib import import_module
from os import path, listdir
from os import listdir, path
from string import lower
import messagetypes

1
src/network/announcethread.py

@ -4,7 +4,6 @@ Announce myself (node address)
import time
import state
from bmconfigparser import BMConfigParser
from network.assemble import assemble_addr
from network.connectionpool import BMConnectionPool

10
src/network/bmproto.py

@ -19,9 +19,9 @@ from bmconfigparser import BMConfigParser
from inventory import Inventory
from network.advanceddispatcher import AdvancedDispatcher
from network.bmobject import (
BMObject, BMObjectInsufficientPOWError, BMObjectInvalidDataError,
BMObjectExpiredError, BMObjectUnwantedStreamError,
BMObjectInvalidError, BMObjectAlreadyHaveError
BMObject, BMObjectAlreadyHaveError, BMObjectExpiredError,
BMObjectInsufficientPOWError, BMObjectInvalidDataError,
BMObjectInvalidError, BMObjectUnwantedStreamError
)
from network.constants import (
ADDRESS_ALIVE, MAX_MESSAGE_SIZE, MAX_OBJECT_COUNT,
@ -30,8 +30,8 @@ from network.constants import (
from network.dandelion import Dandelion
from network.proxy import ProxyError
from node import Node, Peer
from objectracker import missingObjects, ObjectTracker
from queues import objectProcessorQueue, portCheckerQueue, invQueue, addrQueue
from objectracker import ObjectTracker, missingObjects
from queues import addrQueue, invQueue, objectProcessorQueue, portCheckerQueue
from randomtrackingdict import RandomTrackingDict
logger = logging.getLogger('default')

2
src/network/receivequeuethread.py

@ -6,8 +6,8 @@ import Queue
import socket
import state
from network.connectionpool import BMConnectionPool
from network.advanceddispatcher import UnknownStateError
from network.connectionpool import BMConnectionPool
from queues import receiveDataQueue
from threads import StoppableThread

2
src/network/socks4a.py

@ -5,7 +5,7 @@ SOCKS4a proxy module
import socket
import struct
from proxy import Proxy, ProxyError, GeneralProxyError
from proxy import GeneralProxyError, Proxy, ProxyError
class Socks4aError(ProxyError):

5
src/network/tls.py

@ -7,11 +7,10 @@ import socket
import ssl
import sys
from network.advanceddispatcher import AdvancedDispatcher
import network.asyncore_pollchoose as asyncore
from queues import receiveDataQueue
import paths
from network.advanceddispatcher import AdvancedDispatcher
from queues import receiveDataQueue
logger = logging.getLogger('default')

2
src/plugins/menu_qrcode.py

@ -6,7 +6,7 @@ A menu plugin showing QR-Code for bitmessage address in modal dialog.
import urllib
import qrcode
from PyQt4 import QtGui, QtCore
from PyQt4 import QtCore, QtGui
from pybitmessage.tr import _translate

2
src/plugins/proxyconfig_stem.py

@ -11,8 +11,8 @@ Configure tor proxy and hidden service with
* otherwise use stem's 'BEST' version and save onion keys to the new
section using *onionhostname* as name for future use.
"""
import os
import logging
import os
import random # noseq
import tempfile

3
src/plugins/sound_canberra.py

@ -3,9 +3,8 @@
Sound theme plugin using pycanberra
"""
from pybitmessage.bitmessageqt import sound
import pycanberra
from pybitmessage.bitmessageqt import sound
_canberra = pycanberra.Canberra()

4
src/pyelliptic/__init__.py

@ -9,11 +9,11 @@ For modern cryptography with ECC, AES, HMAC, Blowfish, ...
This is an abandoned package maintained inside of the PyBitmessage.
"""
from .openssl import OpenSSL
from .cipher import Cipher
from .ecc import ECC
from .eccblind import ECCBlind
from .cipher import Cipher
from .hash import hmac_sha256, hmac_sha512, pbkdf2
from .openssl import OpenSSL
__version__ = '1.3'

4
src/pyelliptic/openssl.py

@ -6,9 +6,9 @@
This module loads openssl libs with ctypes and incapsulates
needed openssl functionality in class _OpenSSL.
"""
# pylint: disable=protected-access
import sys
import ctypes
import sys
# pylint: disable=protected-access
OpenSSL = None

6
src/storage/filesystem.py

@ -1,14 +1,14 @@
"""
Module for using filesystem (directory with files) for inventory storage
"""
import string
import time
from binascii import hexlify, unhexlify
from os import listdir, makedirs, path, remove, rmdir
import string
from threading import RLock
import time
from paths import lookupAppdataFolder
from storage import InventoryStorage, InventoryItem
from storage import InventoryItem, InventoryStorage
class FilesystemInventory(InventoryStorage):

4
src/storage/sqlite.py

@ -5,8 +5,8 @@ import sqlite3
import time
from threading import RLock
from helper_sql import sqlQuery, SqlBulkExecute, sqlExecute
from storage import InventoryStorage, InventoryItem
from helper_sql import SqlBulkExecute, sqlExecute, sqlQuery
from storage import InventoryItem, InventoryStorage
class SqliteInventory(InventoryStorage): # pylint: disable=too-many-ancestors

Loading…
Cancel
Save