Skip to main content

flake8 plugin which checks that a timeout is set to all requests and urllib.request.open calls

Project description

ci pre-commit.ci status

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') or urllib.request.open('https://example.com') will trigger TIM100
  • requests.post('https://example.com', timeout=5) or urllib.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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flake8_timeout-1.0.0-py2.py3-none-any.whl (3.7 kB view details)

Uploaded Python 2Python 3

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

Hashes for flake8_timeout-1.0.0.tar.gz
Algorithm Hash digest
SHA256 6371cc791cd0142df3c91eb097d3da8a500e1febb5d4378391907b2edfe38275
MD5 bd237fa0f0bf5ce9d7a28862fb7889a5
BLAKE2b-256 fbf37d1d2b4a7c5f131d6f0d6ffb5274e372f71d4712fc5307be69cac8f2879b

See more details on using hashes here.

File details

Details for the file flake8_timeout-1.0.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for flake8_timeout-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ca1905fa1c65374f7e64d0ef6dd66c9b0b16038e9cb0125554c039b990d10f1c
MD5 d479f8edb85e936f4310eae0ee342021
BLAKE2b-256 cd200381f3d8bb9746822afceada0aaae05432c1494df44c7a0f84be0a769a0c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page