[Lint] Fix spelling mistakes
A quick fix of some of the mistakes caught by codespell. Updated readme with new IRC server Useful to add it as part of linting checks.
This commit is contained in:
parent
d8526ba653
commit
1e6cc03946
|
@ -4,7 +4,7 @@
|
|||
|
||||
Deluge is a BitTorrent client that utilizes a daemon/client model.
|
||||
It has various user interfaces available such as the GTK-UI, Web-UI and
|
||||
a Console-UI. It uses [libtorrent][lt] at it's core to handle the BitTorrent
|
||||
Console-UI. It uses [libtorrent][lt] at its core to handle the BitTorrent
|
||||
protocol.
|
||||
|
||||
## Install
|
||||
|
@ -58,7 +58,7 @@ See the [Thinclient guide] to connect to the daemon from another computer.
|
|||
- [Homepage](https://deluge-torrent.org)
|
||||
- [User guide][user guide]
|
||||
- [Forum](https://forum.deluge-torrent.org)
|
||||
- [IRC Freenode #deluge](irc://irc.freenode.net/deluge)
|
||||
- [IRC Libera.Chat #deluge](irc://irc.libera.chat/deluge)
|
||||
|
||||
[user guide]: https://dev.deluge-torrent.org/wiki/UserGuide
|
||||
[thinclient guide]: https://dev.deluge-torrent.org/wiki/UserGuide/ThinClient
|
||||
|
|
|
@ -264,7 +264,7 @@ class ArgParserBase(argparse.ArgumentParser):
|
|||
args = [a for a in args if a not in withhold]
|
||||
options, remaining = super(ArgParserBase, self).parse_known_args(args=args)
|
||||
options.remaining = remaining
|
||||
# Hanlde common and process group options
|
||||
# Handle common and process group options
|
||||
return self._handle_ui_options(options)
|
||||
|
||||
def _handle_ui_options(self, options):
|
||||
|
|
|
@ -436,7 +436,7 @@ def fsize(fsize_b, precision=1, shortform=False):
|
|||
'110 KiB'
|
||||
|
||||
Note:
|
||||
This function has been refactored for perfomance with the
|
||||
This function has been refactored for performance with the
|
||||
fsize units being translated outside the function.
|
||||
|
||||
"""
|
||||
|
@ -571,7 +571,7 @@ def ftime(secs):
|
|||
'6h 23m'
|
||||
|
||||
Note:
|
||||
This function has been refactored for perfomance.
|
||||
This function has been refactored for performance.
|
||||
|
||||
"""
|
||||
|
||||
|
|
|
@ -293,7 +293,8 @@ class ComponentRegistry(object):
|
|||
obj (Component): a component object to deregister
|
||||
|
||||
Returns:
|
||||
Deferred: a deferred object that will fire once the Component has been sucessfully deregistered
|
||||
Deferred: a deferred object that will fire once the Component has been
|
||||
successfully deregistered
|
||||
|
||||
"""
|
||||
if obj in self.components.values():
|
||||
|
|
|
@ -101,7 +101,7 @@ class AuthManager(component.Component):
|
|||
int: The auth level for this user.
|
||||
|
||||
Raises:
|
||||
AuthenticationRequired: If aditional details are required to authenticate.
|
||||
AuthenticationRequired: If additional details are required to authenticate.
|
||||
BadLoginError: If the username does not exist or password does not match.
|
||||
|
||||
"""
|
||||
|
|
|
@ -267,7 +267,7 @@ class Core(component.Component):
|
|||
version (str): The version string in PEP440 dotted notation.
|
||||
|
||||
Returns:
|
||||
str: The formattted peer_id with Deluge prefix e.g. '--DE200s--'
|
||||
str: The formatted peer_id with Deluge prefix e.g. '--DE200s--'
|
||||
|
||||
"""
|
||||
split = deluge.common.VersionSplit(version)
|
||||
|
@ -456,7 +456,7 @@ class Core(component.Component):
|
|||
return result
|
||||
|
||||
d = self.torrentmanager.prefetch_metadata(magnet, timeout)
|
||||
# Use a seperate callback chain to handle existing prefetching magnet.
|
||||
# Use a separate callback chain to handle existing prefetching magnet.
|
||||
result_d = defer.Deferred()
|
||||
d.addBoth(on_metadata, result_d)
|
||||
return result_d
|
||||
|
@ -747,7 +747,7 @@ class Core(component.Component):
|
|||
import traceback
|
||||
|
||||
traceback.print_exc()
|
||||
# Torrent was probaly removed meanwhile
|
||||
# Torrent was probably removed meanwhile
|
||||
return {}
|
||||
|
||||
# Ask the plugin manager to fill in the plugin keys
|
||||
|
|
|
@ -431,14 +431,14 @@ class Torrent(object):
|
|||
# Setting the priorites for all the pieces of this torrent
|
||||
self.handle.prioritize_pieces(priorities)
|
||||
|
||||
def set_sequential_download(self, set_sequencial):
|
||||
def set_sequential_download(self, sequential):
|
||||
"""Sets whether to download the pieces of the torrent in order.
|
||||
|
||||
Args:
|
||||
set_sequencial (bool): Enable sequencial downloading.
|
||||
sequential (bool): Enable sequential downloading.
|
||||
"""
|
||||
self.options['sequential_download'] = set_sequencial
|
||||
self.handle.set_sequential_download(set_sequencial)
|
||||
self.options['sequential_download'] = sequential
|
||||
self.handle.set_sequential_download(sequential)
|
||||
|
||||
def set_auto_managed(self, auto_managed):
|
||||
"""Set auto managed mode, i.e. will be started or queued automatically.
|
||||
|
@ -1393,7 +1393,7 @@ class Torrent(object):
|
|||
This basically does a file rename on all of the folders children.
|
||||
|
||||
Args:
|
||||
folder (str): The orignal folder name
|
||||
folder (str): The original folder name
|
||||
new_folder (str): The new folder name
|
||||
|
||||
Returns:
|
||||
|
|
|
@ -96,7 +96,7 @@ class TorrentState: # pylint: disable=old-style-class
|
|||
super_seeding=False,
|
||||
name=None,
|
||||
):
|
||||
# Build the class atrribute list from args
|
||||
# Build the class attribute list from args
|
||||
for key, value in locals().items():
|
||||
if key == 'self':
|
||||
continue
|
||||
|
@ -654,7 +654,7 @@ class TorrentManager(component.Component):
|
|||
# Resume AlertManager if paused for adding torrent to libtorrent.
|
||||
component.resume('AlertManager')
|
||||
|
||||
# Store the orignal resume_data, in case of errors.
|
||||
# Store the original resume_data, in case of errors.
|
||||
if resume_data:
|
||||
self.resume_data[torrent.torrent_id] = resume_data
|
||||
|
||||
|
@ -1037,7 +1037,7 @@ class TorrentManager(component.Component):
|
|||
)
|
||||
|
||||
def on_torrent_resume_save(dummy_result, torrent_id):
|
||||
"""Recieved torrent resume_data alert so remove from waiting list"""
|
||||
"""Received torrent resume_data alert so remove from waiting list"""
|
||||
self.waiting_on_resume_data.pop(torrent_id, None)
|
||||
|
||||
deferreds = []
|
||||
|
|
|
@ -56,7 +56,7 @@ def overrides(*args):
|
|||
if inspect.isfunction(args[0]):
|
||||
return _overrides(stack, args[0])
|
||||
else:
|
||||
# One or more classes are specifed, so return a function that will be
|
||||
# One or more classes are specified, so return a function that will be
|
||||
# called with the real function as argument
|
||||
def ret_func(func, **kwargs):
|
||||
return _overrides(stack, func, explicit_base_classes=args)
|
||||
|
@ -107,7 +107,7 @@ def _overrides(stack, method, explicit_base_classes=None):
|
|||
for c in base_classes + check_classes:
|
||||
classes[c] = get_class(c)
|
||||
|
||||
# Verify that the excplicit override class is one of base classes
|
||||
# Verify that the explicit override class is one of base classes
|
||||
if explicit_base_classes:
|
||||
from itertools import product
|
||||
|
||||
|
@ -146,7 +146,7 @@ def _overrides(stack, method, explicit_base_classes=None):
|
|||
def deprecated(func):
|
||||
"""This is a decorator which can be used to mark function as deprecated.
|
||||
|
||||
It will result in a warning being emmitted when the function is used.
|
||||
It will result in a warning being emitted when the function is used.
|
||||
|
||||
"""
|
||||
|
||||
|
|
|
@ -218,7 +218,7 @@ class TwistedLoggingObserver(PythonLoggingObserver):
|
|||
|
||||
def tweak_logging_levels():
|
||||
"""This function allows tweaking the logging levels for all or some loggers.
|
||||
This is mostly usefull for developing purposes hence the contents of the
|
||||
This is mostly useful for developing purposes hence the contents of the
|
||||
file are NOT like regular deluge config file's.
|
||||
|
||||
To use is, create a file named "logging.conf" on your Deluge's config dir
|
||||
|
|
|
@ -129,7 +129,7 @@ class PluginManagerBase(object):
|
|||
|
||||
"""
|
||||
if plugin_name not in self.available_plugins:
|
||||
log.warning('Cannot enable non-existant plugin %s', plugin_name)
|
||||
log.warning('Cannot enable non-existent plugin %s', plugin_name)
|
||||
return defer.succeed(False)
|
||||
|
||||
if plugin_name in self.plugins:
|
||||
|
@ -243,7 +243,7 @@ class PluginManagerBase(object):
|
|||
del self.plugins[name]
|
||||
self.config['enabled_plugins'].remove(name)
|
||||
except Exception as ex:
|
||||
log.warning('Problems occured disabling plugin: %s', name)
|
||||
log.warning('Problems occurred disabling plugin: %s', name)
|
||||
log.debug(ex)
|
||||
ret = False
|
||||
else:
|
||||
|
@ -260,7 +260,7 @@ class PluginManagerBase(object):
|
|||
cont_lines = []
|
||||
# Missing plugin info
|
||||
if not self.pkg_env[name]:
|
||||
log.warning('Failed to retrive info for plugin: %s', name)
|
||||
log.warning('Failed to retrieve info for plugin: %s', name)
|
||||
for k in info:
|
||||
info[k] = 'not available'
|
||||
return info
|
||||
|
|
|
@ -90,7 +90,7 @@ class LabelSidebarMenu(object):
|
|||
for item in self.items:
|
||||
item.set_sensitive(sensitive)
|
||||
|
||||
# add is allways enabled.
|
||||
# add is always enabled.
|
||||
self.item_add.set_sensitive(True)
|
||||
else:
|
||||
# not a label -->hide everything.
|
||||
|
|
|
@ -28,8 +28,8 @@ class DelugeTransferProtocol(Protocol, object):
|
|||
"""
|
||||
Deluge RPC wire protocol.
|
||||
|
||||
Data messages are transfered with a header containing a protocol version
|
||||
and the length of the data to be transfered (payload).
|
||||
Data messages are transferred with a header containing a protocol version
|
||||
and the length of the data to be transferred (payload).
|
||||
|
||||
The format is::
|
||||
|
||||
|
@ -51,7 +51,7 @@ class DelugeTransferProtocol(Protocol, object):
|
|||
"""
|
||||
Transfer the data.
|
||||
|
||||
:param data: data to be transfered in a data structure serializable by rencode.
|
||||
:param data: data to be transferred in a data structure serializable by rencode.
|
||||
"""
|
||||
body = zlib.compress(rencode.dumps(data))
|
||||
body_len = len(body)
|
||||
|
@ -68,8 +68,8 @@ class DelugeTransferProtocol(Protocol, object):
|
|||
"""
|
||||
This method is called whenever data is received.
|
||||
|
||||
:param data: a message as transfered by transfer_message, or a part of such
|
||||
a messsage.
|
||||
:param data: a message as transferred by transfer_message, or a part of such
|
||||
a message.
|
||||
|
||||
Global variables:
|
||||
_buffer - contains the data received
|
||||
|
@ -120,7 +120,7 @@ class DelugeTransferProtocol(Protocol, object):
|
|||
|
||||
def _handle_complete_message(self, data):
|
||||
"""
|
||||
Handles a complete message as it is transfered on the network.
|
||||
Handles a complete message as it is transferred on the network.
|
||||
|
||||
:param data: a zlib compressed string encoded with rencode.
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ class DelugeRPCRequest(object):
|
|||
Returns a properly formatted RPCRequest based on the properties. Will
|
||||
raise a TypeError if the properties haven't been set yet.
|
||||
|
||||
:returns: a properly formated RPCRequest
|
||||
:returns: a properly formatted RPCRequest
|
||||
"""
|
||||
if (
|
||||
self.request_id is None
|
||||
|
@ -150,7 +150,7 @@ class DelugeRPCProtocol(DelugeTransferProtocol):
|
|||
# so it could pass back to the 2nd deferred on the chain. But,
|
||||
# that does not always happen.
|
||||
# So, just do some instance checking and just log rpc error at
|
||||
# diferent levels.
|
||||
# different levels.
|
||||
r = self.__rpc_requests[request_id]
|
||||
msg = 'RPCError Message Received!'
|
||||
msg += '\n' + '-' * 80
|
||||
|
@ -168,7 +168,7 @@ class DelugeRPCProtocol(DelugeTransferProtocol):
|
|||
# Let's log these as errors
|
||||
log.error(msg)
|
||||
else:
|
||||
# The rest just get's logged in debug level, just to log
|
||||
# The rest just gets logged in debug level, just to log
|
||||
# what's happening
|
||||
log.debug(msg)
|
||||
except Exception:
|
||||
|
|
|
@ -70,7 +70,9 @@ class Command(BaseCommand):
|
|||
|
||||
def on_removed_finished(errors):
|
||||
if errors:
|
||||
self.console.write('Error(s) occured when trying to delete torrent(s).')
|
||||
self.console.write(
|
||||
'Error(s) occurred when trying to delete torrent(s).'
|
||||
)
|
||||
for t_id, e_msg in errors:
|
||||
self.console.write('Error removing torrent %s : %s' % (t_id, e_msg))
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ class OptionParserError(Exception):
|
|||
class ConsoleBaseParser(argparse.ArgumentParser):
|
||||
def format_help(self):
|
||||
"""Differs from ArgumentParser.format_help by adding the raw epilog
|
||||
as formatted in the string. Default bahavior mangles the formatting.
|
||||
as formatted in the string. Default behavior mangles the formatting.
|
||||
|
||||
"""
|
||||
# Handle epilog manually to keep the text formatting
|
||||
|
|
|
@ -449,7 +449,7 @@ class FilesTab(Tab):
|
|||
try:
|
||||
value = completed_bytes / self.treestore[parent][1] * 100
|
||||
except ZeroDivisionError:
|
||||
# Catch the unusal error found when moving folders around
|
||||
# Catch the unusual error found when moving folders around
|
||||
value = 0
|
||||
self.treestore[parent][3] = value
|
||||
self.treestore[parent][2] = '%i%%' % value
|
||||
|
|
|
@ -224,7 +224,7 @@ class FilterTreeView(component.Component):
|
|||
label = decode_bytes(model.get_value(row, 2))
|
||||
count = model.get_value(row, 3)
|
||||
|
||||
# Supress Warning: g_object_set_qdata: assertion `G_IS_OBJECT (object)' failed
|
||||
# Suppress Warning: g_object_set_qdata: assertion `G_IS_OBJECT (object)' failed
|
||||
original_filters = warnings.filters[:]
|
||||
warnings.simplefilter('ignore')
|
||||
try:
|
||||
|
|
|
@ -2204,7 +2204,7 @@ used sparingly.</property>
|
|||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip_text" translatable="yes">Torrents not transfering any data do not count towards download/seeding active count.</property>
|
||||
<property name="tooltip_text" translatable="yes">Torrents not transferring any data do not count towards download/seeding active count.</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
|
|
|
@ -221,7 +221,7 @@ class GtkUI(object):
|
|||
menubar_osx(self, self.osxapp)
|
||||
self.osxapp.ready()
|
||||
|
||||
# Initalize the plugins
|
||||
# Initialize the plugins
|
||||
self.plugins = PluginManager()
|
||||
|
||||
# Show the connection manager
|
||||
|
|
|
@ -112,7 +112,7 @@ class ListView(object):
|
|||
Gtk.TreeViewColumn.set_visible(self, visible)
|
||||
if self.data_func:
|
||||
if not visible:
|
||||
# Set data function to None to prevent unecessary calls when column is hidden
|
||||
# Set data function to None to prevent unnecessary calls when column is hidden
|
||||
self.set_cell_data_func(self.cell_renderer, None, func_data=None)
|
||||
else:
|
||||
self.set_cell_data_func(
|
||||
|
|
|
@ -110,7 +110,7 @@ class StatusTab(Tab):
|
|||
if decode_bytes(widget[0].get_text()) != txt:
|
||||
widget[0].set_text(txt)
|
||||
|
||||
# Update progress bar seperately as it's a special case (not a label).
|
||||
# Update progress bar separately as it's a special case (not a label).
|
||||
fraction = status['progress'] / 100
|
||||
|
||||
if self.config['show_piecesbar']:
|
||||
|
|
|
@ -102,7 +102,7 @@ class HostList(object):
|
|||
self.config.save()
|
||||
|
||||
def check_info_exists(self, hostname, port, username, skip_host_id=None):
|
||||
"""Check for exising host entries with the same details.
|
||||
"""Check for existing host entries with the same details.
|
||||
|
||||
Args:
|
||||
hostname (str): The IP or hostname of the deluge daemon.
|
||||
|
|
|
@ -60,7 +60,7 @@ def make_expires(timeout):
|
|||
|
||||
class Auth(JSONComponent):
|
||||
"""
|
||||
The component that implements authentification into the JSON interface.
|
||||
The component that implements authentication into the JSON interface.
|
||||
"""
|
||||
|
||||
def __init__(self, config):
|
||||
|
|
|
@ -653,7 +653,7 @@ class DelugeWeb(component.Component):
|
|||
|
||||
Args:
|
||||
options (argparse.Namespace): The web server options.
|
||||
daemon (bool): If True run web server as a seperate daemon process (starts a twisted
|
||||
daemon (bool): If True run web server as a separate daemon process (starts a twisted
|
||||
reactor). If False shares the process and twisted reactor from WebUI plugin or tests.
|
||||
|
||||
"""
|
||||
|
@ -698,7 +698,7 @@ class DelugeWeb(component.Component):
|
|||
|
||||
self.auth = Auth(self.config)
|
||||
self.daemon = daemon
|
||||
# Initalize the plugins
|
||||
# Initialize the plugins
|
||||
self.plugins = PluginManager()
|
||||
|
||||
def _on_language_changed(self, key, value):
|
||||
|
|
|
@ -10,7 +10,7 @@ deluge-console - A BitTorrent client console interface
|
|||
Deluge utilizes a client/server model, with \fBdeluged\fR being the daemon process and \fBdeluge-console\fR being used to launch a curses console user-interface.
|
||||
.P
|
||||
.SS Console Commands:
|
||||
You can pass console commands directly from the command line and use semi-colon (\fB;\fR) seperator to run multiple commands. Enclosing the commands with quotes may also be required
|
||||
You can pass console commands directly from the command line and use semi-colon (\fB;\fR) separator to run multiple commands. Enclosing the commands with quotes may also be required
|
||||
for example:
|
||||
|
||||
\fBdeluge-console 'add <torrent>; info <torrent_id>'\fR
|
||||
|
|
|
@ -255,7 +255,7 @@ MOCK_MODULES = ['deluge._libtorrent', 'xdg', 'xdg.BaseDirectory']
|
|||
for mod_name in MOCK_MODULES:
|
||||
sys.modules[mod_name] = Mock()
|
||||
|
||||
# Must add these for autodoc to import packages successully
|
||||
# Must add these for autodoc to import packages successfully
|
||||
builtins.__dict__['_'] = lambda x: x
|
||||
builtins.__dict__['_n'] = lambda s, p, n: s if n == 1 else p
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ Install with pip:
|
|||
|
||||
pip install deluge
|
||||
|
||||
Install with all optional dependecies:
|
||||
Install with all optional dependencies:
|
||||
|
||||
pip install deluge[all]
|
||||
|
||||
|
|
Loading…
Reference in New Issue