Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Apply suggestions from code review

Andrey Rakhmatullinaf1be835e4a6
diff --git a/docs/topics/settings.rst b/docs/topics/settings.rst
index d0f2acd89..0963f835f 100644
--- a/docs/topics/settings.rst
+++ b/docs/topics/settings.rst
@@ -81,7 +81,7 @@ to do so is by setting their :attr:`~scrapy.Spider.custom_settings` attribute:
"SOME_SETTING": "some value",
}
-It's often better to provide a :meth:`~scrapy.Spider.update_settings` instead,
+It's often better to implement :meth:`~scrapy.Spider.update_settings` instead,
and settings set there should use the "spider" priority explicitly:
.. code-block:: python
@@ -94,8 +94,8 @@ and settings set there should use the "spider" priority explicitly:
@classmethod
def update_settings(cls, settings):
- settings.set("SOME_SETTING", "some value", priority="spider")
super().update_settings(settings)
+ settings.set("SOME_SETTING", "some value", priority="spider")
3. Project settings module
--------------------------
diff --git a/docs/topics/spiders.rst b/docs/topics/spiders.rst
index 97b525bd6..5c3bf6e72 100644
--- a/docs/topics/spiders.rst
+++ b/docs/topics/spiders.rst
@@ -162,7 +162,7 @@ scrapy.Spider
settings, spider attributes or other factors and use setting priorities
other than ``'spider'``. Also, it's easy to extend ``update_settings()``
in a subclass by overriding it, while doing the same with
- :attr:`~scrapy.Spider.custom_settings` is hard or impossible.
+ :attr:`~scrapy.Spider.custom_settings` can be hard.
For example, suppose a spider needs to modify :setting:`FEEDS`:
@@ -182,8 +182,8 @@ scrapy.Spider
@classmethod
def update_settings(cls, settings):
- settings.setdefault("FEEDS", {}).update(cls.custom_feed)
super().update_settings(settings)
+ settings.setdefault("FEEDS", {}).update(cls.custom_feed)
.. method:: start_requests()