bellingcat / EDGAR

Tool for the retrieval of corporate and financial data from the SEC
https://colab.research.google.com/github/bellingcat/EDGAR/blob/main/notebook/Bellingcat_EDGAR_Tool.ipynb
GNU General Public License v3.0
95 stars 12 forks source link

Union Type is added in Python 3.10 #32

Open andy-seleya opened 1 week ago

andy-seleya commented 1 week ago

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 commented 6 days ago

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 commented 6 days ago

Or we could add:

from __future__ import annotations
andy-seleya commented 8 hours ago

agree, they should work