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
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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flake8_timeout-0.2.0.tar.gz.
File metadata
- Download URL: flake8_timeout-0.2.0.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77beef924da76e0b80acc88d35c2fc8d929522d463e4eb1998ad5383050dff02
|
|
| MD5 |
e6d98da264cb308dfa4d3fc7ebc16ed4
|
|
| BLAKE2b-256 |
77eee1b4b0294ba4a474bd17009f3ee94ea97f68f244d3529ab6ee9f97f4b84a
|
File details
Details for the file flake8_timeout-0.2.0-py2.py3-none-any.whl.
File metadata
- Download URL: flake8_timeout-0.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19ac6beb299a9fb9cc5318657fd416cf034c9bc755af7aba1ca62a1b6011100d
|
|
| MD5 |
3c7b733f7563959760876e800eff3d6f
|
|
| BLAKE2b-256 |
3f885bc18f3a5d7d2927dcb92fa94b202f1356622fad11d75801a1bb6f13fd09
|