From: Scott Gasch Date: Wed, 27 Apr 2022 14:46:40 +0000 (-0700) Subject: Oops, update type hints in geocode. X-Git-Url: https://wannabe.guru.org/gitweb/?a=commitdiff_plain;h=21612b3a2ecaed6bf9fec16891bee9bdeb006081;p=python_utils.git Oops, update type hints in geocode. --- diff --git a/geocode.py b/geocode.py index 87c23f5..0a020d5 100644 --- a/geocode.py +++ b/geocode.py @@ -1,13 +1,13 @@ #!/usr/bin/env python3 -# © Copyright 2021-2022, Scott Gasch +# © Copyright 2022, Scott Gasch """Wrapper around US Census address geocoder API described here: https://www2.census.gov/geo/pdfs/maps-data/data/Census_Geocoder_User_Guide.pdf""" import logging import re -from typing import Dict, Optional +from typing import Any, Dict, Optional import requests from bs4 import BeautifulSoup @@ -18,7 +18,7 @@ import string_utils logger = logging.getLogger(__name__) -def geocode_address(address: str) -> Optional[Dict[str, str]]: +def geocode_address(address: str) -> Optional[Dict[str, Any]]: """Send a single address to the US Census geocoding API. >>> out = geocode_address('4600 Silver Hill Rd,, 20233')