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:
Sarah Hoffmann
2022-08-09 11:06:54 +02:00
parent 196dc2a659
commit 8d082c13e0
6 changed files with 21 additions and 19 deletions

View File

@@ -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])