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

Union Type is added in Python 3.10 #32

Closed
andy-seleya opened this issue Jun 27, 2024 · 3 comments · Fixed by #35
Closed

Union Type is added in Python 3.10 #32

andy-seleya opened this issue Jun 27, 2024 · 3 comments · Fixed by #35
Labels
bug Something isn't working

Comments

@andy-seleya
Copy link

Considering union type is available starting from python 3.10 (docs), adding location based search #28 will limit python version to 3.10+.

image
@GalenReich GalenReich added the bug Something isn't working label Jun 27, 2024
@GalenReich
Copy link
Collaborator

Am I right in thinking that this tweak to use the existing typing.Union import would fix this?

def parse_location_input(location_input: Union[str, tuple, None]) -> Union[str, None]:

@GalenReich
Copy link
Collaborator

Or we could add:

from __future__ import annotations

@andy-seleya
Copy link
Author

agree, they should work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants