Skip to content

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

PEP8ify settings module

Jakob de Maeyer9eb3597d159a
diff --git a/scrapy/settings/__init__.py b/scrapy/settings/__init__.py
index ed201e980..6c922a709 100644
--- a/scrapy/settings/__init__.py
+++ b/scrapy/settings/__init__.py
@@ -19,6 +19,7 @@ SETTINGS_PRIORITIES = {
'cmdline': 40,
}
+
def get_settings_priority(priority):
"""
Small helper function that looks up a given string priority in the
@@ -196,8 +197,8 @@ class BaseSettings(MutableMapping):
def _getcomposite(self, name):
# DO NOT USE THIS FUNCTION IN YOUR CUSTOM PROJECTS
- # It's for internal use in the transition away from the _BASE settings and
- # will be removed along with _BASE support in a future release
+ # It's for internal use in the transition away from the _BASE settings
+ # and will be removed along with _BASE support in a future release
basename = name + "_BASE"
if basename in self:
warnings.warn('_BASE settings are deprecated.',
@@ -482,6 +483,7 @@ def iter_default_settings():
if name.isupper():
yield name, getattr(default_settings, name)
+
def overridden_settings(settings):
"""Return a dict of the settings that have been overridden"""
for name, defvalue in iter_default_settings():