flake8 plugin which checks that a timeout is set to all requests calls
Project description
flake8-timeout
flake8 plugin which checks that a timeout is set in all requests
and urllib.request.open
calls.
- For example:
requests.post('https://example.com')
orurllib.request.open('https://example.com')
will triggerTIM100
requests.post('https://example.com', timeout=5)
orurllib.request.open('https://example.com', timeout=5)
is expected instead
installation
pip install flake8-timeout
flake8 code
Code | Description |
---|---|
TIM100 | timeout missing for request call |
as a pre-commit hook
See pre-commit for instructions
Sample .pre-commit-config.yaml
:
- repo: https://github.com/pycqa/flake8
rev: 3.9.1
hooks:
- id: flake8
additional_dependencies: [flake8-timeout==0.2.0]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
flake8_timeout-0.2.0.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for flake8_timeout-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19ac6beb299a9fb9cc5318657fd416cf034c9bc755af7aba1ca62a1b6011100d |
|
MD5 | 3c7b733f7563959760876e800eff3d6f |
|
BLAKE2b-256 | 3f885bc18f3a5d7d2927dcb92fa94b202f1356622fad11d75801a1bb6f13fd09 |