Description
π Describe the bug
async def _run_app(app: Union[Application, Awaitable[Application]], *,
host: Optional[str]=None,The documentation is a bit woolly:
"host (str) β TCP/IP host or a sequence of hosts for HTTP server. Default is '0.0.0.0' if port has been specified or if path is not supplied."
('(str)' excludes 'None' and excludes 'a sequence of hosts'. Also, I don't think you mean 'sequence' literally.)
But it's clear from reading the code that an iterable of strings is planned for (along with several other types).
I would think you want Optional[Union[str, Iterable[str]]] - though given the following code it's maybe unclear if you think other types are also acceptable.
π‘ To Reproduce
Write some code like this and then run it though mypy
from aiohttp.web import run_app
hosts: List[str] = ['a', 'b']
run_app(host=hosts)π‘ Expected behavior
If a list of strings is acceptable, then the attribute is wrong. I'm surprised mypy didn't spot it during CI, actually.
π Your version of the Python
$ python --version
Python 3.6.9π Your version of the aiohttp/yarl/multidict distributions
$ python -m pip show aiohttp
Name: aiohttp
Version: 3.6.2$ python -m pip show multidict
Name: multidict
Version: 4.7.6$ python -m pip show yarl
Name: yarl
Version: 1.5.1