mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
psycopg2: fix range annotations (#11071)
This commit is contained in:
committed by
GitHub
parent
d27426488e
commit
b92221eb97
@@ -33,7 +33,7 @@ class Range:
|
||||
def __ge__(self, other: Range) -> bool: ...
|
||||
|
||||
def register_range(
|
||||
pgrange: str, pyrange: str | Range, conn_or_curs: connection | cursor, globally: bool = False
|
||||
pgrange: str, pyrange: str | type[Range], conn_or_curs: connection | cursor, globally: bool = False
|
||||
) -> RangeCaster: ...
|
||||
|
||||
class RangeAdapter:
|
||||
@@ -51,7 +51,12 @@ class RangeCaster:
|
||||
typecaster: Any
|
||||
array_typecaster: Any
|
||||
def __init__(
|
||||
self, pgrange: str | RangeAdapter, pyrange: str | Range, oid: int, subtype_oid: int, array_oid: int | None = None
|
||||
self,
|
||||
pgrange: str | type[RangeAdapter],
|
||||
pyrange: str | type[Range],
|
||||
oid: int,
|
||||
subtype_oid: int,
|
||||
array_oid: int | None = None,
|
||||
) -> None: ...
|
||||
@overload
|
||||
def parse(self, s: None, cur: cursor | None = None) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user