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.

For example:

[tool.scrapy-lint.per-file-ignores]
"spiders/toscrape_com.py" = ["SCP46"]

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:

  1. The requirements file specified in scrapinghub.yml if such file exists and contains a root requirements key with a file value pointing to an existing file (path interpreted relative to the project root).

  2. The requirements.txt file in the project root directory, i.e. where scrapy.cfg lives.