mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
adapt to new type annotations from typeshed
Some more functions frrom psycopg are now properly annotated. No ignoring necessary anymore.
This commit is contained in:
@@ -41,4 +41,7 @@ def get_property(conn: Connection, name: str) -> Optional[str]:
|
||||
if cur.rowcount == 0:
|
||||
return None
|
||||
|
||||
return cast(Optional[str], cur.fetchone()[0]) # type: ignore[no-untyped-call]
|
||||
result = cur.fetchone()
|
||||
assert result is not None
|
||||
|
||||
return cast(Optional[str], result[0])
|
||||
|
||||
Reference in New Issue
Block a user