https://github.com/stummjr/flake8-inline-requests
An experimental flake8 plugin to find (potentially) problematic usage of inline requests in Scrapy spiders
https://github.com/stummjr/flake8-inline-requests
flake8-plugin scrapy
Last synced: 7 months ago
JSON representation
An experimental flake8 plugin to find (potentially) problematic usage of inline requests in Scrapy spiders
- Host: GitHub
- URL: https://github.com/stummjr/flake8-inline-requests
- Owner: stummjr
- License: mit
- Created: 2018-03-24T14:55:32.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-25T23:37:14.000Z (almost 8 years ago)
- Last Synced: 2025-03-01T07:47:42.342Z (about 1 year ago)
- Topics: flake8-plugin, scrapy
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# flake8-inline-requests
An experimental flake8 plugin to find possibly problematic usage of inline
requests in Scrapy spiders.
## What does it detect?
This plugin will raise a Flake8 issue when it finds inline requests such as:
```
resp = yield Request(url)
```
Instead of:
```
resp = yield Request(url, meta={'handle_httpstatus_all': True})
```
## Why
Because an inline request without `meta={'handle_httpstatus_all': True}` that
gets a 404 response (for example) will silently fail and the current callback
will stop.
With that meta param, you'll get the 404 (or whatever) response back and you can
decide what to do with that response.
## Warning
This is a highly experimental plugin and it may miss many cases.