S113 - Rule Doesn't Take httpx
Default Timeout into Account
#12210
Labels
rule
Implementing or modifying a lint rule
httpx
Default Timeout into Account
#12210
The S113 rule has the following description:
This rule fails to take into account that
httpx
enforces a default timeout of 5.0 seconds globally.Omitting the timeout parameter in httpx's top-level API calls still results in a 5 second timeout. Likewise, the same applies to both
httpx.Client
andhttpx.AsyncClient
.httpx Docs Used for Reference
https://www.python-httpx.org/advanced/timeouts/
Timeouts can be explicitely disabled as so:
Suggestion
Maybe S113 can check for
timeout=None
in the case ofhttpx
. Or I can just disable S113 if this rule is working as intended.The text was updated successfully, but these errors were encountered: