Options
Options that you can set in pyproject.toml, under [tool.scrapy-lint].
ignore
Rules to ignore for all files.
For example:
[tool.scrapy-lint]
ignore = ["SCP46"]
known-settings
Setting names that must not trigger SCP27: Unknown setting.
For example:
[tool.scrapy-lint]
known-settings = [
"FOO",
"BAR",
]
per-file-ignores
Rules to ignore for specific files.
Changed in version VERSION: Added support for patterns.
Keys are gitignore patterns, relative to the project root. When more than one pattern matches a file, all their rules are ignored for that file.
For example:
[tool.scrapy-lint.per-file-ignores]
"spiders/toscrape_com.py" = ["SCP46"]
"spiders/legacy/" = ["SCP08", "SCP09"]
requirements-file
The path to the requirements file of the Scrapy project:
[tool.scrapy-lint]
requirements-file = "path/to/my-requirements.txt"
If not specified, a requirements file is looked up as follows:
The requirements file specified in
scrapinghub.ymlif such file exists and contains a rootrequirementskey with afilevalue pointing to an existing file (path interpreted relative to the project root).The
requirements.txtfile in the project root directory, i.e. wherescrapy.cfglives.
If no requirements file is found, dependencies are read from the project
section of pyproject.toml, i.e. from dependencies and
optional-dependencies.