]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
chore: re-export names to fix mypy 0.971 error
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Thu, 28 Jul 2022 10:03:20 +0000 (12:03 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Thu, 28 Jul 2022 10:03:20 +0000 (12:03 +0200)
psycopg/psycopg/_cmodule.py

index 710564cd8514483d9f71923c7d5bff16015227b6..288ef1ba0f551c590cd3ae06ac7dec4eab1e7ad6 100644 (file)
@@ -13,11 +13,11 @@ __version__: Optional[str] = None
 # Note: "c" must the first attempt so that mypy associates the variable the
 # right module interface. It will not result Optional, but hey.
 if pq.__impl__ == "c":
-    from psycopg_c import _psycopg
-    from psycopg_c import __version__  # noqa: F401
+    from psycopg_c import _psycopg as _psycopg
+    from psycopg_c import __version__ as __version__  # noqa: F401
 elif pq.__impl__ == "binary":
-    from psycopg_binary import _psycopg  # type: ignore
-    from psycopg_binary import __version__  # type: ignore  # noqa: F401
+    from psycopg_binary import _psycopg as _psycopg  # type: ignore
+    from psycopg_binary import __version__ as __version__  # type: ignore  # noqa: F401
 elif pq.__impl__ == "python":
     _psycopg = None  # type: ignore
 else: