Spellcheck

This commit is contained in:
Alexander Krotov 2018-06-21 02:46:16 +03:00
parent 22d799a75e
commit 1d27ab2254
10 changed files with 39 additions and 39 deletions

View File

@ -84,7 +84,7 @@ def create_paths():
if not path.exists():
for parent_path in reversed(path.parents):
# Create all parent folders
# dont use mkdir(parent=True), as it ignores `mode`
# don't use mkdir(parent=True), as it ignores `mode`
# when creating the parents
if not parent_path.exists():
print(('creating %s directory') % parent_path)

View File

@ -75,7 +75,7 @@ SERVICE_DIRECT_TLS = 'xmpps-client'
class CommonConnection:
"""
Common connection class, can be derivated for normal connection or zeroconf
Common connection class, can be derived for normal connection or zeroconf
connection
"""
@ -119,7 +119,7 @@ class CommonConnection:
# Remember where we are in the register agent process
self.agent_registrations = {}
# To know the groupchat jid associated with a sranza ID. Useful to
# To know the groupchat jid associated with a stanza ID. Useful to
# request vcard or os info... to a real JID but act as if it comes from
# the fake jid
self.groupchat_jids = {} # {ID : groupchat_jid}
@ -164,7 +164,7 @@ class CommonConnection:
def reconnect(self):
"""
To be implemented by derivated classes
To be implemented by derived classes
"""
raise NotImplementedError
@ -222,7 +222,7 @@ class CommonConnection:
def check_jid(self, jid):
"""
This function must be implemented by derivated classes. It has to return
This function must be implemented by derived classes. It has to return
the valid jid, or raise a helpers.InvalidFormat exception
"""
raise NotImplementedError
@ -404,44 +404,44 @@ class CommonConnection:
def ack_subscribed(self, jid):
"""
To be implemented by derivated classes
To be implemented by derived classes
"""
raise NotImplementedError
def ack_unsubscribed(self, jid):
"""
To be implemented by derivated classes
To be implemented by derived classes
"""
raise NotImplementedError
def request_subscription(self, jid, msg='', name='', groups=None,
auto_auth=False):
"""
To be implemented by derivated classes
To be implemented by derived classes
"""
raise NotImplementedError
def send_authorization(self, jid):
"""
To be implemented by derivated classes
To be implemented by derived classes
"""
raise NotImplementedError
def refuse_authorization(self, jid):
"""
To be implemented by derivated classes
To be implemented by derived classes
"""
raise NotImplementedError
def unsubscribe(self, jid, remove_auth = True):
"""
To be implemented by derivated classes
To be implemented by derived classes
"""
raise NotImplementedError
def unsubscribe_agent(self, agent):
"""
To be implemented by derivated classes
To be implemented by derived classes
"""
raise NotImplementedError
@ -458,13 +458,13 @@ class CommonConnection:
def new_account(self, name, config, sync=False):
"""
To be implemented by derivated classes
To be implemented by derived classes
"""
raise NotImplementedError
def _on_new_account(self, con=None, con_type=None):
"""
To be implemented by derivated classes
To be implemented by derived classes
"""
raise NotImplementedError
@ -473,37 +473,37 @@ class CommonConnection:
def request_os_info(self, jid, resource):
"""
To be implemented by derivated classes
To be implemented by derived classes
"""
raise NotImplementedError
def get_settings(self):
"""
To be implemented by derivated classes
To be implemented by derived classes
"""
raise NotImplementedError
def get_bookmarks(self):
"""
To be implemented by derivated classes
To be implemented by derived classes
"""
raise NotImplementedError
def store_bookmarks(self):
"""
To be implemented by derivated classes
To be implemented by derived classes
"""
raise NotImplementedError
def get_metacontacts(self):
"""
To be implemented by derivated classes
To be implemented by derived classes
"""
raise NotImplementedError
def send_agent_status(self, agent, ptype):
"""
To be implemented by derivated classes
To be implemented by derived classes
"""
raise NotImplementedError

View File

@ -1,5 +1,5 @@
"""
This module is in charge of taking care of all the infomation related to
This module is in charge of taking care of all the information related to
individual files. Files are identified by the account name and its sid.
@ -21,7 +21,7 @@ class FilesProp:
_files_props = {}
def __init__(self):
raise Exception('this class should not be instatiated')
raise Exception('this class should not be instantiated')
@classmethod
def getNewFileProp(cls, account, sid):
@ -93,7 +93,7 @@ class FilesProp:
class FileProp(object):
def __init__(self, account, sid):
# Do not instatiate this class directly. Call FilesProp.getNeFileProp
# Do not instantiate this class directly. Call FilesProp.getNeFileProp
# instead
self.streamhosts = []
self.transfered_size = []

View File

@ -76,7 +76,7 @@ class ConnectionJingle(object):
is a new session.
TODO: Also check if the stanza isn't an error stanza, if so route it
adequatelly.
adequately.
"""
# get data
try:
@ -209,7 +209,7 @@ class ConnectionJingle(object):
return sessions
def set_file_info(self, file_):
# Saves information about the files we have transfered in case they need
# Saves information about the files we have transferred in case they need
# to be requested again.
self.files.append(file_)

View File

@ -466,7 +466,7 @@ class UserLocationPEP(AbstractPEP):
for entry in location.keys():
text = location[entry]
text = GLib.markup_escape_text(text)
# Translate standart location tag
# Translate standard location tag
tag = LOCATION_DATA.get(entry, entry)
location_string += '\n<b>%(tag)s</b>: %(text)s' % \
{'tag': tag.capitalize(), 'text': text}

View File

@ -80,7 +80,7 @@ class SocksQueue:
def start_listener(self, port, sha_str, sha_handler, file_props,
fingerprint=None, typ='sender'):
"""
Start waiting for incomming connections on (host, port) and do a socks5
Start waiting for incoming connections on (host, port) and do a socks5
authentication using sid for generated SHA
"""
log.debug('Start listening for socks5 connection')
@ -190,7 +190,7 @@ class SocksQueue:
self.remove_receiver(streamhost['idx'])
return
# set state -2, meaning that this streamhost is stopped,
# but it may be connectected later
# but it may be connected later
if host['state'] >= 0:
if file_props.type_ == 's':
self.remove_sender(host['idx'], False)
@ -406,7 +406,7 @@ class SocksQueue:
def remove_receiver(self, idx, do_disconnect=True, remove_all=False):
"""
Remove reciver from the list and decrease the number of active
Remove receiver from the list and decrease the number of active
connections with 1
"""
if idx != -1:

View File

@ -131,7 +131,7 @@ class CacheDictionary:
"""
A dictionary that keeps items around for only a specific time. Lifetime is
in minutes. Getrefresh specifies whether to refresh when an item is merely
accessed instead of set aswell
accessed instead of set as well
"""
def __init__(self, lifetime, getrefresh = True):
@ -2087,7 +2087,7 @@ class DiscussionGroupsBrowser(AgentBrowser):
def update_actions(self):
"""
Called when user selected a row. Make subscribe/unsubscribe buttons
sensitive appropriatelly
sensitive appropriately
"""
# we have nothing to do if we don't have buttons...
if self.subscribe_button is None: return

View File

@ -52,7 +52,7 @@ class GajimPlugin(object):
'''
Short name of plugin.
Used for quick indentification of plugin.
Used for quick identification of plugin.
:type: str
@ -114,7 +114,7 @@ class GajimPlugin(object):
Keys of this string should be strings with name of GUI extension point
to handles. Values should be 2-element tuples with references to handling
functions. First function will be used to connect plugin with extpoint,
the second one to successfuly disconnect from it. Connecting takes places
the second one to successfully disconnect from it. Connecting takes places
when plugin is activated and extpoint already exists, or when plugin is
already activated but extpoint is being created (eg. chat window opens).
Disconnecting takes place when plugin is deactivated and extpoint exists

View File

@ -51,7 +51,7 @@ class log_calls(object):
'GajimPluginConfigDialog', 'PluginsWindow']
'''
List of classes from which no logs should be emited when methods are called,
eventhough `log_calls` decorator is used.
even though `log_calls` decorator is used.
'''
def __init__(self, classname='', log=log):
@ -60,7 +60,7 @@ class log_calls(object):
classname : str
Name of class to prefix function name (if function is a method).
log : logging.Logger
Logger to use when outputing debug information on when function has
Logger to use when outputting debug information on when function has
been entered and when left. By default: `plugins.helpers.log`
is used.
'''

View File

@ -60,7 +60,7 @@ class PluginManager(metaclass=Singleton):
:todo: implement mechanism to dynamically load plugins where GUI extension
points have been already called (i.e. when plugin is activated
after GUI object creation). [DONE?]
:todo: implement mechanism to dynamically deactive plugins (call plugin's
:todo: implement mechanism to dynamically deactivate plugins (call plugin's
deactivation handler) [DONE?]
:todo: when plug-in is deactivated all GUI extension points are removed
from `PluginManager.gui_extension_points_handlers`. But when
@ -155,7 +155,7 @@ class PluginManager(metaclass=Singleton):
'''
removes the plugin from the plugin list and deletes all loaded modules
from sys. This way we will have a fresh start when the plugin gets added
agin.
again.
'''
if plugin.active:
self.deactivate_plugin(plugin)
@ -192,7 +192,7 @@ class PluginManager(metaclass=Singleton):
def extension_point(self, gui_extpoint_name, *args):
'''
Invokes all handlers (from plugins) for a particular extension point, but
doesnt add it to collection for further processing.
doesn't add it to collection for further processing.
For example if you pass a message for encryption via extension point to a
plugin, its undesired that the call is stored and replayed on activating the
plugin. For example after an update.
@ -487,7 +487,7 @@ class PluginManager(metaclass=Singleton):
:rtype: [] of class objects
:note: currently it only searches for plugin classes in '\*.py' files
present in given direcotory `path` (no recursion here)
present in given directory `path` (no recursion here)
:todo: add scanning zipped modules
'''