From efaedae801637df227229ac098c13355e09c7056 Mon Sep 17 00:00:00 2001 From: swedge Date: Thu, 15 Oct 2020 19:35:44 -0400 Subject: [PATCH] Fixes #846 --- fabfile/tasks.py | 2 +- src/bitmessagecli.py | 10 +++++----- src/bitmessagekivy/main.kv | 4 ++-- src/bitmessagekivy/mpybit.py | 14 +++++++------- src/bitmessageqt/__init__.py | 2 +- src/bitmessageqt/account.py | 2 +- src/bitmessageqt/foldertree.py | 2 +- src/bitmessageqt/newaddresswizard.py | 2 +- src/bitmessageqt/utils.py | 4 ++-- src/class_sqlThread.py | 4 ++-- src/debug.py | 4 ++-- src/depends.py | 8 ++++---- src/helper_startup.py | 2 +- src/kivymd/accordion.py | 2 +- src/paths.py | 2 +- src/qidenticon.py | 2 +- src/tests/test_config.py | 4 ++-- src/upnp.py | 2 +- 18 files changed, 36 insertions(+), 36 deletions(-) diff --git a/fabfile/tasks.py b/fabfile/tasks.py index fb05937d..dbb1203f 100644 --- a/fabfile/tasks.py +++ b/fabfile/tasks.py @@ -24,7 +24,7 @@ from version import softwareVersion # pylint: disable=wrong-import-position def get_tool_results(file_list): - """Take a list of files and resuln the results of applying the tools""" + """Take a list of files and the results of applying the tools""" results = [] for path_to_file in file_list: diff --git a/src/bitmessagecli.py b/src/bitmessagecli.py index 01dbc9bb..1b9fdca1 100644 --- a/src/bitmessagecli.py +++ b/src/bitmessagecli.py @@ -4,7 +4,7 @@ # pylint: disable=too-many-nested-blocks,too-many-locals,protected-access,too-many-arguments,too-many-function-args # pylint: disable=no-member """ -Created by Adam Melton (.dok) referenceing https://bitmessage.org/wiki/API_Reference for API documentation +Created by Adam Melton (.dok) referencing https://bitmessage.org/wiki/API_Reference for API documentation Distributed under the MIT/X11 software license. See http://www.opensource.org/licenses/mit-license.php. This is an example of a daemon client for PyBitmessage 0.6.2, by .dok (Version 0.3.1) , modified @@ -448,7 +448,7 @@ def subscribe(): def unsubscribe(): - """Unsusbcribe from an address""" + """Unsubscribe from an address""" global usrPrompt while True: @@ -623,7 +623,7 @@ def genAdd(lbl, deterministic, passphrase, numOfAdd, addVNum, streamNum, ripe): def saveFile(fileName, fileData): - """Allows attachments and messages/broadcats to be saved""" + """Allows attachments and messages/broadcasts to be saved""" # This section finds all invalid characters and replaces them with ~ fileName = fileName.replace(" ", "") @@ -1337,7 +1337,7 @@ def markMessageRead(messageID): def markMessageUnread(messageID): - """Mark a mesasge as unread""" + """Mark a message as unread""" global usrPrompt @@ -1541,7 +1541,7 @@ def UI(usrInput): usrPrompt = 1 main() - elif usrInput == "subscribe": # Subsribe to an address + elif usrInput == "subscribe": # Subscribe to an address subscribe() usrPrompt = 1 main() diff --git a/src/bitmessagekivy/main.kv b/src/bitmessagekivy/main.kv index ea8936c5..dff58443 100644 --- a/src/bitmessagekivy/main.kv +++ b/src/bitmessagekivy/main.kv @@ -226,7 +226,7 @@ BoxLayout: text: 'TO' color: 0,0,0,1 TextInput: - id: recipent + id: recipient hint_text: 'To' BoxLayout: @@ -348,7 +348,7 @@ BoxLayout: color: 0,0,0,1 : - name: 'add_sucess' + name: 'add_success' Label: text: 'Successfully created a new bit address' color: 0,0,0,1 diff --git a/src/bitmessagekivy/mpybit.py b/src/bitmessagekivy/mpybit.py index 3f9b198b..651f4ad1 100644 --- a/src/bitmessagekivy/mpybit.py +++ b/src/bitmessagekivy/mpybit.py @@ -157,7 +157,7 @@ class Inbox(Screen): Clock.schedule_once(self.init_ui, 0) def init_ui(self, dt=0): - """Clock Schdule for method inbox accounts.""" + """Clock Schedule for method inbox accounts.""" self.inboxaccounts() print(dt) @@ -208,7 +208,7 @@ class Sent(Screen): Clock.schedule_once(self.init_ui, 0) def init_ui(self, dt=0): - """Clock Schdule for method sent accounts.""" + """Clock Schedule for method sent accounts.""" self.sentaccounts() print(dt) @@ -251,7 +251,7 @@ class Trash(Screen): Clock.schedule_once(self.init_ui, 0) def init_ui(self, dt=0): - """Clock Schdule for method inbox accounts.""" + """Clock Schedule for method inbox accounts.""" self.inboxaccounts() print(dt) @@ -303,7 +303,7 @@ class Create(Screen): def send(self): """Send message from one address to another.""" fromAddress = self.ids.spinner_id.text - # For now we are using static address i.e we are not using recipent field value. + # For now we are using static address i.e we are not using recipient field value. toAddress = "BM-2cWyUfBdY2FbgyuCb7abFZ49JYxSzUhNFe" message = self.ids.message.text subject = self.ids.subject.text @@ -350,7 +350,7 @@ class Create(Screen): self.ids.message.text = '' self.ids.spinner_id.text = '' self.ids.subject.text = '' - self.ids.recipent.text = '' + self.ids.recipient.text = '' return None @@ -386,7 +386,7 @@ class NewIdentity(Screen): nonceTrialsPerByte, payloadLengthExtraBytes) ) - self.manager.current = 'add_sucess' + self.manager.current = 'add_success' if __name__ == '__main__': diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index 8a3b2510..4ac78f11 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -1671,7 +1671,7 @@ class MyForm(settingsmixin.SMainWindow): QtCore.QTimer.singleShot(0, self.appIndicatorHide) elif event.oldState() & QtCore.Qt.WindowMinimized: # The window state has just been changed to - # Normal/Maximised/FullScreen + # Normal/Maximized/FullScreen pass def __icon_activated(self, reason): diff --git a/src/bitmessageqt/account.py b/src/bitmessageqt/account.py index 50ea3548..a1ac2b7e 100644 --- a/src/bitmessageqt/account.py +++ b/src/bitmessageqt/account.py @@ -50,7 +50,7 @@ def getSortedSubscriptions(count=False): :param count: Whether to count messages for each fromaddress in the inbox :type count: bool, default False - :retuns: dict keys are addresses, values are dicts containing settings + :returns: dict keys are addresses, values are dicts containing settings :rtype: dict, default {} """ queryreturn = sqlQuery('SELECT label, address, enabled FROM subscriptions ORDER BY label COLLATE NOCASE ASC') diff --git a/src/bitmessageqt/foldertree.py b/src/bitmessageqt/foldertree.py index e6d64427..464d7674 100644 --- a/src/bitmessageqt/foldertree.py +++ b/src/bitmessageqt/foldertree.py @@ -599,7 +599,7 @@ class AddressBookCompleter(QtGui.QCompleter): else: self.cursorPos = self.widget().cursorPosition() - # Get current prosition + # Get current position curIndex = self.widget().cursorPosition() # prev_delimiter_index should actually point at final white space diff --git a/src/bitmessageqt/newaddresswizard.py b/src/bitmessageqt/newaddresswizard.py index 2311239c..f1af961a 100644 --- a/src/bitmessageqt/newaddresswizard.py +++ b/src/bitmessageqt/newaddresswizard.py @@ -120,7 +120,7 @@ class NewAddressWizardPassphrasePage(QtGui.QWizardPage): super(QtGui.QWizardPage, self).__init__() self.setTitle("Passphrase") - label = QtGui.QLabel("Deterministric address.") + label = QtGui.QLabel("Deterministic address.") label.setWordWrap(True) passphraseLabel = QtGui.QLabel("Passphrase") diff --git a/src/bitmessageqt/utils.py b/src/bitmessageqt/utils.py index e118f487..51046c41 100644 --- a/src/bitmessageqt/utils.py +++ b/src/bitmessageqt/utils.py @@ -24,7 +24,7 @@ def identiconize(address): identicon_lib = BMConfigParser().safeGet( 'bitmessagesettings', 'identiconlib', 'qidenticon_two_x') - # As an 'identiconsuffix' you could put "@bitmessge.ch" or "@bm.addr" + # As an 'identiconsuffix' you could put "@bitmessage.ch" or "@bm.addr" # to make it compatible with other identicon generators. (Note however, # that E-Mail programs might convert the BM-address to lowercase first.) # It can be used as a pseudo-password to salt the generation of @@ -34,7 +34,7 @@ def identiconize(address): if identicon_lib[:len('qidenticon')] == 'qidenticon': # originally by: # :Author:Shin Adachi - # Licesensed under FreeBSD License. + # Licensed under FreeBSD License. # stripped from PIL and uses QT instead (by sendiulo, same license) import qidenticon icon_hash = hashlib.md5( diff --git a/src/class_sqlThread.py b/src/class_sqlThread.py index 7e9eb6c5..8ce0bb4a 100644 --- a/src/class_sqlThread.py +++ b/src/class_sqlThread.py @@ -160,7 +160,7 @@ class sqlThread(threading.Thread): self.cur.execute( '''INSERT INTO subscriptions VALUES''' '''('Bitmessage new releases/announcements','BM-GtovgYdgs7qXPkoYaRgrLFuFKz1SFpsw',1)''') - logger.debug('Commiting.') + logger.debug('Committing.') self.conn.commit() logger.debug('Vacuuming message.dat. You might notice that the file size gets much smaller.') self.cur.execute(''' VACUUM ''') @@ -433,7 +433,7 @@ class sqlThread(threading.Thread): else: logger.error(err) - # Let us check to see the last time we vaccumed the messages.dat file. + # Let us check to see the last time we vacuumed the messages.dat file. # If it has been more than a month let's do it now. item = '''SELECT value FROM settings WHERE key='lastvacuumtime';''' parameters = '' diff --git a/src/debug.py b/src/debug.py index cab07275..218d5abb 100644 --- a/src/debug.py +++ b/src/debug.py @@ -1,5 +1,5 @@ """ -Logging and debuging facility +Logging and debugging facility ----------------------------- Levels: @@ -46,7 +46,7 @@ import state helper_startup.loadConfig() -# Now can be overriden from a config file, which uses standard python +# Now can be overridden from a config file, which uses standard python # logging.config.fileConfig interface # examples are here: # https://bitmessage.org/forum/index.php/topic,4820.msg11163.html#msg11163 diff --git a/src/depends.py b/src/depends.py index 03e297f1..41b332c2 100755 --- a/src/depends.py +++ b/src/depends.py @@ -178,7 +178,7 @@ def check_sqlite(): """Do sqlite check. Simply check sqlite3 module if exist or not with hexversion - support in python version for specifieed platform. + support in python version for specified platform. """ if sys.hexversion < 0x020500F0: logger.error( @@ -224,7 +224,7 @@ def check_sqlite(): return False return True except sqlite3.Error: - logger.exception('An exception occured while checking sqlite.') + logger.exception('An exception occurred while checking sqlite.') return False finally: if conn: @@ -374,12 +374,12 @@ def check_pyqt(): passed = True if QtCore.PYQT_VERSION < 0x40800: logger.error( - 'This version of PyQt is too old. PyBitmessage requries' + 'This version of PyQt is too old. PyBitmessage requires' ' PyQt 4.8 or later.') passed = False if QtCore.QT_VERSION < 0x40700: logger.error( - 'This version of Qt is too old. PyBitmessage requries' + 'This version of Qt is too old. PyBitmessage requires' ' Qt 4.7 or later.') passed = False return passed diff --git a/src/helper_startup.py b/src/helper_startup.py index fcd12aa4..71b53b51 100644 --- a/src/helper_startup.py +++ b/src/helper_startup.py @@ -71,7 +71,7 @@ def loadConfig(): config.set('bitmessagesettings', 'startonlogon', 'false') if 'linux' in sys.platform: config.set('bitmessagesettings', 'minimizetotray', 'false') - # This isn't implimented yet and when True on + # This isn't implemented yet and when True on # Ubuntu causes Bitmessage to disappear while # running when minimized. else: diff --git a/src/kivymd/accordion.py b/src/kivymd/accordion.py index 6e816ca6..0f337aef 100644 --- a/src/kivymd/accordion.py +++ b/src/kivymd/accordion.py @@ -28,7 +28,7 @@ class MDAccordionItem(ThemableBehavior, AccordionItem): ''' Color for title text and icon if `title_theme_color` is Custom ''' background_color = ListProperty(None, allownone=True) - ''' Color for the background of the accordian item title in rgba format. + ''' Color for the background of the accordion item title in rgba format. ''' divider_color = ListProperty(None, allownone=True) diff --git a/src/paths.py b/src/paths.py index e2f8c97e..cb6b0436 100644 --- a/src/paths.py +++ b/src/paths.py @@ -100,7 +100,7 @@ def tail(f, lines=20): f.seek(block_number * BLOCK_SIZE, 2) blocks.append(f.read(BLOCK_SIZE)) else: - # file too small, start from begining + # file too small, start from beginning f.seek(0, 0) # only read what was not read blocks.append(f.read(block_end_byte)) diff --git a/src/qidenticon.py b/src/qidenticon.py index 6eab09cd..8ffda5ce 100644 --- a/src/qidenticon.py +++ b/src/qidenticon.py @@ -138,7 +138,7 @@ class DonRenderer(IdenticonRendererBase): [(0, 0), (4, 0), (4, 4), (0, 4)], # [1] right-angled triangle pointing top-left: [(0, 0), (4, 0), (0, 4)], - # [2] upwardy triangle: + # [2] upwardly triangle: [(2, 0), (4, 4), (0, 4)], # [3] left half of square, standing rectangle: [(0, 0), (2, 0), (2, 4), (0, 4)], diff --git a/src/tests/test_config.py b/src/tests/test_config.py index 35ddd3fa..48be4017 100644 --- a/src/tests/test_config.py +++ b/src/tests/test_config.py @@ -13,7 +13,7 @@ class TestConfig(unittest.TestCase): """A test case for bmconfigparser""" def test_safeGet(self): - """safeGet retuns provided default for nonexistent option or None""" + """safeGet returns provided default for nonexistent option or None""" self.assertIs( BMConfigParser().safeGet('nonexistent', 'nonexistent'), None) self.assertEqual( @@ -32,7 +32,7 @@ class TestConfig(unittest.TestCase): 'nonexistent', 'nonexistent', True) def test_safeGetInt(self): - """safeGetInt retuns provided default for nonexistent option or 0""" + """safeGetInt returns provided default for nonexistent option or 0""" self.assertEqual( BMConfigParser().safeGetInt('nonexistent', 'nonexistent'), 0) self.assertEqual( diff --git a/src/upnp.py b/src/upnp.py index 34111afd..6910e8b2 100644 --- a/src/upnp.py +++ b/src/upnp.py @@ -80,7 +80,7 @@ class UPnPError(Exception): class Router: # pylint: disable=old-style-class - """Encapulate routing""" + """Encapsulate routing""" name = "" path = "" address = None