diff options
author | Calum Lind <calumlind+deluge@gmail.com> | 2021-09-21 22:40:13 +0200 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2021-09-21 22:43:53 +0200 |
commit | 1e6cc0394666ae95e9521f1016d07d56a3ed43a5 (patch) | |
tree | 9c4a1cd6da29403c8f14e6f190490ff39ab656ae | |
parent | [UI] Add magnet icons for copy and add actions (diff) | |
download | deluge-1e6cc0394666ae95e9521f1016d07d56a3ed43a5.tar.xz deluge-1e6cc0394666ae95e9521f1016d07d56a3ed43a5.zip |
[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.
29 files changed, 54 insertions, 51 deletions
@@ -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 diff --git a/deluge/argparserbase.py b/deluge/argparserbase.py index 5eec1228f..547c1c71c 100644 --- a/deluge/argparserbase.py +++ b/deluge/argparserbase.py @@ -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): diff --git a/deluge/common.py b/deluge/common.py index e90d166c0..a0e3fdd3b 100644 --- a/deluge/common.py +++ b/deluge/common.py @@ -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. """ diff --git a/deluge/component.py b/deluge/component.py index 28e663344..b7b7ab3e4 100644 --- a/deluge/component.py +++ b/deluge/component.py @@ -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(): diff --git a/deluge/core/authmanager.py b/deluge/core/authmanager.py index 0d997c10c..713373e99 100644 --- a/deluge/core/authmanager.py +++ b/deluge/core/authmanager.py @@ -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. """ diff --git a/deluge/core/core.py b/deluge/core/core.py index cdf1ec39b..ff1aed022 100644 --- a/deluge/core/core.py +++ b/deluge/core/core.py @@ -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 diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py index 9dc2d4163..d7dab95bf 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -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: diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py index 174a92dae..67c4cafd1 100644 --- a/deluge/core/torrentmanager.py +++ b/deluge/core/torrentmanager.py @@ -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 = [] diff --git a/deluge/decorators.py b/deluge/decorators.py index b101712d4..a601bf7e0 100644 --- a/deluge/decorators.py +++ b/deluge/decorators.py @@ -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. """ diff --git a/deluge/log.py b/deluge/log.py index fa83091d1..99838529f 100644 --- a/deluge/log.py +++ b/deluge/log.py @@ -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 diff --git a/deluge/pluginmanagerbase.py b/deluge/pluginmanagerbase.py index f838cd3cb..767535805 100644 --- a/deluge/pluginmanagerbase.py +++ b/deluge/pluginmanagerbase.py @@ -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 diff --git a/deluge/plugins/Label/deluge_label/gtkui/sidebar_menu.py b/deluge/plugins/Label/deluge_label/gtkui/sidebar_menu.py index 34358db6e..fe0e86bda 100644 --- a/deluge/plugins/Label/deluge_label/gtkui/sidebar_menu.py +++ b/deluge/plugins/Label/deluge_label/gtkui/sidebar_menu.py @@ -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. diff --git a/deluge/transfer.py b/deluge/transfer.py index 6b26549e2..6f8884ad4 100644 --- a/deluge/transfer.py +++ b/deluge/transfer.py @@ -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. diff --git a/deluge/ui/client.py b/deluge/ui/client.py index 686f962b3..180d8ef2b 100644 --- a/deluge/ui/client.py +++ b/deluge/ui/client.py @@ -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: diff --git a/deluge/ui/console/cmdline/commands/rm.py b/deluge/ui/console/cmdline/commands/rm.py index ff3125d81..c34148ac9 100644 --- a/deluge/ui/console/cmdline/commands/rm.py +++ b/deluge/ui/console/cmdline/commands/rm.py @@ -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)) diff --git a/deluge/ui/console/parser.py b/deluge/ui/console/parser.py index 1c0bd7009..917773aef 100644 --- a/deluge/ui/console/parser.py +++ b/deluge/ui/console/parser.py @@ -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 diff --git a/deluge/ui/gtk3/files_tab.py b/deluge/ui/gtk3/files_tab.py index 6fda2fd37..50f8a4587 100644 --- a/deluge/ui/gtk3/files_tab.py +++ b/deluge/ui/gtk3/files_tab.py @@ -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 diff --git a/deluge/ui/gtk3/filtertreeview.py b/deluge/ui/gtk3/filtertreeview.py index a7b6aa87c..4272ef018 100644 --- a/deluge/ui/gtk3/filtertreeview.py +++ b/deluge/ui/gtk3/filtertreeview.py @@ -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: diff --git a/deluge/ui/gtk3/glade/preferences_dialog.ui b/deluge/ui/gtk3/glade/preferences_dialog.ui index 1882521fd..11eda3296 100644 --- a/deluge/ui/gtk3/glade/preferences_dialog.ui +++ b/deluge/ui/gtk3/glade/preferences_dialog.ui @@ -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> diff --git a/deluge/ui/gtk3/gtkui.py b/deluge/ui/gtk3/gtkui.py index ebb78e8b2..74f29384e 100644 --- a/deluge/ui/gtk3/gtkui.py +++ b/deluge/ui/gtk3/gtkui.py @@ -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 diff --git a/deluge/ui/gtk3/listview.py b/deluge/ui/gtk3/listview.py index 07b366978..4e9fe5db8 100644 --- a/deluge/ui/gtk3/listview.py +++ b/deluge/ui/gtk3/listview.py @@ -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( diff --git a/deluge/ui/gtk3/status_tab.py b/deluge/ui/gtk3/status_tab.py index fab671940..938c2dd7d 100644 --- a/deluge/ui/gtk3/status_tab.py +++ b/deluge/ui/gtk3/status_tab.py @@ -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']: diff --git a/deluge/ui/hostlist.py b/deluge/ui/hostlist.py index 09130192c..b4bb538fb 100644 --- a/deluge/ui/hostlist.py +++ b/deluge/ui/hostlist.py @@ -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. diff --git a/deluge/ui/web/auth.py b/deluge/ui/web/auth.py index fa9504954..d631f9186 100644 --- a/deluge/ui/web/auth.py +++ b/deluge/ui/web/auth.py @@ -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): diff --git a/deluge/ui/web/server.py b/deluge/ui/web/server.py index d730e72e9..f3866729e 100644 --- a/deluge/ui/web/server.py +++ b/deluge/ui/web/server.py @@ -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): diff --git a/docs/man/deluge-console.1 b/docs/man/deluge-console.1 index 75ab1f0bf..edffba5ac 100644 --- a/docs/man/deluge-console.1 +++ b/docs/man/deluge-console.1 @@ -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 diff --git a/docs/source/conf.py b/docs/source/conf.py index 450e802aa..267e562af 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -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 diff --git a/docs/source/intro/01-install.md b/docs/source/intro/01-install.md index dea4e9c59..2474dcebb 100644 --- a/docs/source/intro/01-install.md +++ b/docs/source/intro/01-install.md @@ -22,7 +22,7 @@ Install with pip: pip install deluge -Install with all optional dependecies: +Install with all optional dependencies: pip install deluge[all] @@ -246,7 +246,7 @@ class BuildTranslations(cmd.Command): upto_date = True if upto_date: - sys.stdout.write(' po files already upto date. ') + sys.stdout.write(' po files already up to date. ') sys.stdout.write('\b\b \nFinished compiling translation files. \n') |