SCP41: Unneeded import path
What it does
Reports the use of import path strings instead of actual Python objects in setting values.
Why is this bad?
While using import paths is not bad per se, and is sometimes necessary [1], when using Scrapy 2.4.0 (2020-10-11) or higher, it is better to use actual Python objects (e.g. classes, functions, modules) directly in settings.
Using Python objects directly allows IDEs and static analysis tools to detect issues at development time, such as typos or missing dependencies, and allows IDEs to provide better autocompletion and refactoring support.
Example
ADDONS = {
"scrapy_poet.Addon": 300,
}
Instead use:
import scrapy_poet
ADDONS = {
scrapy_poet.Addon: 300,
}