BaseConnector limit if of type int
but documentation suggests None
as an option
#8514
Closed
1 task done
Labels
Describe the bug
aiohttp.BaseConnector
has an optionlimit
which is anint
according to Python typing. However, the doc mentionslimit (int – total number simultaneous connections. If limit is None the connector has no limit (default: 100).
. Then, when setting this option toNone
, Mypy complainsArgument "limit" to "TCPConnector" has incompatible type "None"; expected "int" - mypy arg-type
Proposed solution: set the type value of
limit
toOptionnal[int]
orint | None
inBaseConnector
and other connectorsTo Reproduce
Expected behavior
Mypy raises no error.
Logs/tracebacks
Python Version
aiohttp Version
multidict Version
yarl Version
OS
WSL Ubuntu on Windows 10
Related component
Client
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: