Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export Query type #1050

Closed
Dreamsorcerer opened this issue Aug 5, 2024 · 1 comment · Fixed by #1113
Closed

Export Query type #1050

Dreamsorcerer opened this issue Aug 5, 2024 · 1 comment · Fixed by #1113

Comments

@Dreamsorcerer
Copy link
Member

In aiohttp we define params which is simply passed to URL.with_query(). We should have this parameter typed to allow the same things, but the type is rather complex:

yarl/yarl/__init__.pyi

Lines 18 to 22 in efea830

_SimpleQuery = Union[str, int, float]
_QueryVariable = Union[_SimpleQuery, Sequence[_SimpleQuery]]
_Query = Union[
None, str, Mapping[str, _QueryVariable], Sequence[Tuple[str, _QueryVariable]]
]

Therefore, it'd be useful to export this type from yarl in order to be reused.

@bdraco
Copy link
Member

bdraco commented Sep 4, 2024

I think this should be a bit easier to make work now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants