Various improvements
This commit is contained in:
parent
474d9c6a66
commit
d24744bc29
7 changed files with 71 additions and 29 deletions
0
geocode/py.typed
Normal file
0
geocode/py.typed
Normal file
|
|
@ -153,7 +153,7 @@ def unescape_title(t: str) -> str:
|
|||
return urllib.parse.unquote(t.replace("_", " "))
|
||||
|
||||
|
||||
Hit = dict[str, str | None]
|
||||
Hit = dict[str, str | int | None]
|
||||
|
||||
|
||||
def commons_from_rows(rows: list[Row]) -> Hit | None:
|
||||
|
|
@ -188,6 +188,7 @@ def build_dict(hit: Hit | None, lat: str | float, lon: str | float) -> WikidataD
|
|||
"coords": coords,
|
||||
"admin_level": hit.get("admin_level"),
|
||||
"wikidata": hit["wikidata"],
|
||||
"element": hit.get("element"),
|
||||
}
|
||||
if not commons_cat:
|
||||
return ret
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue