massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / psycopg2 / psycopg2 / pool.pyi
1 from typing import Any
2
3 import psycopg2
4
5 class PoolError(psycopg2.Error): ...
6
7 class AbstractConnectionPool:
8     minconn: Any
9     maxconn: Any
10     closed: bool
11     def __init__(self, minconn, maxconn, *args, **kwargs) -> None: ...
12     # getconn, putconn and closeall are officially documented as methods of the
13     # abstract base class, but in reality, they only exist on the children classes
14     def getconn(self, key: Any | None = ...): ...
15     def putconn(self, conn: Any, key: Any | None = ..., close: bool = ...) -> None: ...
16     def closeall(self) -> None: ...
17
18 class SimpleConnectionPool(AbstractConnectionPool): ...
19
20 class ThreadedConnectionPool(AbstractConnectionPool):
21     # This subclass has a default value for conn which doesn't exist
22     # in the SimpleConnectionPool class, nor in the documentation
23     def putconn(self, conn: Any | None = ..., key: Any | None = ..., close: bool = ...) -> None: ...