mirror of https://github.com/astral-sh/ruff
## Summary S113 exists because `requests` doesn't have a default timeout, so request without timeout may hang indefinitely > B113: Test for missing requests timeout This plugin test checks for requests or httpx calls without a timeout specified. > > Nearly all production code should use this parameter in nearly all requests, **Failure to do so can cause your program to hang indefinitely.** But httpx has default timeout 5s, so S113 for httpx request without `timeout` argument is a false positive, only valid case would be `timeout=None`. https://www.python-httpx.org/advanced/timeouts/ > HTTPX is careful to enforce timeouts everywhere by default. > > The default behavior is to raise a TimeoutException after 5 seconds of network inactivity. ## Test Plan snap updated |
||
|---|---|---|
| .. | ||
| resources | ||
| src | ||
| Cargo.toml | ||
| __init__.py | ||