Add missing __slots__ to third-party packages (#15454)

This commit is contained in:
Semyon Moroz
2026-02-22 20:08:46 +01:00
committed by GitHub
parent 9a9cc1834d
commit b43fc8f6f3
11 changed files with 54 additions and 2 deletions
+1
View File
@@ -8,6 +8,7 @@ from psycopg2._psycopg import _type, connection, cursor
_T_co = TypeVar("_T_co", covariant=True)
class Range(Generic[_T_co]):
__slots__ = ("_lower", "_upper", "_bounds")
def __init__(
self, lower: _T_co | None = None, upper: _T_co | None = None, bounds: str = "[)", empty: bool = False
) -> None: ...
+1
View File
@@ -71,6 +71,7 @@ class DictCursor(DictCursorBase):
def __next__(self) -> DictRow: ... # type: ignore[override]
class DictRow(list[Any]):
__slots__ = ("_index",)
def __init__(self, cursor) -> None: ...
def __getitem__(self, x): ...
def __setitem__(self, x, v) -> None: ...