Scrapy, a fast high-level web crawling & scraping framework for Python.
Unify the "add-on" spelling.
Andrey Rakhmatullin005c8cc5f00f
diff --git a/docs/topics/addons.rst b/docs/topics/addons.rstindex 36c7e0fa0..8733f9bde 100644--- a/docs/topics/addons.rst+++ b/docs/topics/addons.rst@@ -19,7 +19,7 @@ Add-ons and their configuration live in Scrapy'sinitialization the add-on manager will read a list of enabled add-ons from your``ADDONS`` setting.-The ``ADDONS`` setting is a dict in which every key is an addon class or its+The ``ADDONS`` setting is a dict in which every key is an add-on class or itsimport path and the value is its priority.This is an example where two add-ons are enabled in a project's@@ -52,16 +52,16 @@ They can also have the following method:.. classmethod:: from_crawler(cls, crawler):noindex:- If present, this class method is called to create an addon instance+ If present, this class method is called to create an add-on instancefrom a :class:`~scrapy.crawler.Crawler`. It must return a new instance- of the addon. The crawler object provides access to all Scrapy core- components like settings and signals; it is a way for the addon to access+ of the add-on. The crawler object provides access to all Scrapy core+ components like settings and signals; it is a way for the add-on to accessthem and hook its functionality into Scrapy.- :param crawler: The crawler that uses this addon+ :param crawler: The crawler that uses this add-on:type crawler: :class:`~scrapy.crawler.Crawler`-The settings set by the addon should use the ``addon`` priority (see+The settings set by the add-on should use the ``addon`` priority (see:ref:`populating-settings` and :func:`scrapy.settings.BaseSettings.set`)::class MyAddon:@@ -71,7 +71,7 @@ The settings set by the addon should use the ``addon`` priority (seeThis allows users to override these settings in the project or spiderconfiguration. This is not possible with settings that are mutable objects,such as the dict that is a value of :setting:`ITEM_PIPELINES`. In these cases-you can provide an addon-specific setting that governs whether the addon will+you can provide an add-on-specific setting that governs whether the add-on willmodify :setting:`ITEM_PIPELINES`::class MyAddon:@@ -82,7 +82,7 @@ modify :setting:`ITEM_PIPELINES`::Fallbacks----------Some components provided by addons need to fall back to "default"+Some components provided by add-ons need to fall back to "default"implementations, e.g. a custom download handler needs to send the request thatit doesn't handle via the default download handler, or a stats collector thatincludes some additional processing but otherwise uses the default stats@@ -98,14 +98,14 @@ recommend that such custom components should be written in the following way:be able to load the class of the fallback component from a special setting(e.g. ``MY_FALLBACK_DOWNLOAD_HANDLER``), create an instance of it and useit.-2. The addons that include these components should read the current value of+2. The add-ons that include these components should read the current value ofthe default setting (e.g. ``DOWNLOAD_HANDLERS``) in their``update_settings()`` methods, save that value into the fallback setting(``MY_FALLBACK_DOWNLOAD_HANDLER`` mentioned earlier) and set the default- setting to the component provided by the addon (e.g.+ setting to the component provided by the add-on (e.g.``MyDownloadHandler``). If the fallback setting is already set by the user,they shouldn't change it.-3. This way, if there are several addons that want to modify the same setting,+3. This way, if there are several add-ons that want to modify the same setting,all of them will fallback to the component from the previous one and then tothe Scrapy default. The order of that depends on the priority order in the``ADDONS`` setting.diff --git a/docs/topics/settings.rst b/docs/topics/settings.rstindex 139e0a35f..602ab587d 100644--- a/docs/topics/settings.rst+++ b/docs/topics/settings.rst@@ -40,7 +40,7 @@ precedence:1. Command line options (most precedence)2. Settings per-spider3. Project settings module- 4. Settings set by addons+ 4. Settings set by add-ons5. Default settings per-command6. Default global settings (less precedence)@@ -90,10 +90,10 @@ project, it's where most of your custom settings will be populated. For astandard Scrapy project, this means you'll be adding or changing the settingsin the ``settings.py`` file created for your project.-4. Settings set by addons--------------------------+4. Settings set by add-ons+---------------------------:ref:`Addons <topics-addons>` can modify settings. They should do this with+:ref:`Add-ons <topics-addons>` can modify settings. They should do this withthis priority, though this is not enforced.5. Default settings per-commanddiff --git a/scrapy/addons.py b/scrapy/addons.pyindex 812892613..e72c5da98 100644--- a/scrapy/addons.py+++ b/scrapy/addons.py@@ -28,7 +28,7 @@ class AddonManager:def load_settings(self, settings) -> None:"""Load add-ons and configurations from a settings object.- This will load the addon for every add-on path in the+ This will load the add-on for every add-on path in the``ADDONS`` setting.:param settings: The :class:`~scrapy.settings.Settings` object from \