projects
/
python_utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7a43ca8
)
Oops, update type hints in geocode.
author
Scott Gasch
<
[email protected]
>
Wed, 27 Apr 2022 14:46:40 +0000
(07:46 -0700)
committer
Scott Gasch
<
[email protected]
>
Wed, 27 Apr 2022 14:46:40 +0000
(07:46 -0700)
geocode.py
patch
|
blob
|
history
diff --git
a/geocode.py
b/geocode.py
index 87c23f57da30259eef321b2f35affce43d562574..0a020d5fd79fa0145f3a944dacafcb12f4d0470e 100644
(file)
--- a/
geocode.py
+++ b/
geocode.py
@@
-1,13
+1,13
@@
#!/usr/bin/env python3
#!/usr/bin/env python3
-# © Copyright 202
1-202
2, 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
"""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
import requests
from bs4 import BeautifulSoup
@@
-18,7
+18,7
@@
import string_utils
logger = logging.getLogger(__name__)
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')
"""Send a single address to the US Census geocoding API.
>>> out = geocode_address('4600 Silver Hill Rd,, 20233')