flake8 plugin which checks that a timeout is set to all requests and urllib.request.open 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: 4.0.1
hooks:
- id: flake8
additional_dependencies: [flake8-timeout==0.3.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-1.0.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-1.0.0.tar.gz.
File metadata
- Download URL: flake8_timeout-1.0.0.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6371cc791cd0142df3c91eb097d3da8a500e1febb5d4378391907b2edfe38275
|
|
| MD5 |
bd237fa0f0bf5ce9d7a28862fb7889a5
|
|
| BLAKE2b-256 |
fbf37d1d2b4a7c5f131d6f0d6ffb5274e372f71d4712fc5307be69cac8f2879b
|
File details
Details for the file flake8_timeout-1.0.0-py2.py3-none-any.whl.
File metadata
- Download URL: flake8_timeout-1.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca1905fa1c65374f7e64d0ef6dd66c9b0b16038e9cb0125554c039b990d10f1c
|
|
| MD5 |
d479f8edb85e936f4310eae0ee342021
|
|
| BLAKE2b-256 |
cd200381f3d8bb9746822afceada0aaae05432c1494df44c7a0f84be0a769a0c
|