add Sequence[str | int]
typing in _RequestOptions.params
#9144
Labels
Sequence[str | int]
typing in _RequestOptions.params
#9144
Describe the bug
I want to send query params with session.get(). with one of the param is a list. Based on the documentation here,
So i try to sent with that. And it works. The problem is with the typing, mypy complaining about incompatible type
Output
I try to find the code that may cause the problem. And i found that params typing is not supporting sequence like str or int.
params: Union[Mapping[str, Union[str, int]], str, None]
. I think this is easy to fix, because it's only the problem with the params type forgot to addSequence[str | int]
To Reproduce
Use mypy to analyze this code
Expected behavior
mypy is not complaining about incompatible type
Logs/tracebacks
Python Version
Python 3.12.1
aiohttp Version
multidict Version
yarl Version
OS
Windows
Related component
Client
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: