psycopg2: use Error and Warning from _psycopg.pyi in errors.pyi (#6454)

This commit is contained in:
Joachim Jablon
2021-11-30 14:26:50 +01:00
committed by GitHub
parent 1f62ff62e7
commit e96dde7618

View File

@@ -1,17 +1,4 @@
from typing import Any
class Error:
def __init__(self, *args, **kwargs): ...
args: Any
cursor: Any
diag: Any
pgcode: Any
pgerror: Any
with_traceback: Any
class Warning:
args: Any
with_traceback: Any
from psycopg2._psycopg import Error as Error, Warning as Warning
class DatabaseError(Error): ...
class InterfaceError(Error): ...