Improve __enter__ & constructor methods (#7114)

This commit is contained in:
Alex Waygood
2022-02-02 21:14:59 +00:00
committed by GitHub
parent 7ccbbdb30a
commit b4e97a1909
11 changed files with 39 additions and 21 deletions

View File

@@ -1,3 +1,4 @@
from _typeshed import Self
from typing import Any, Mapping
from .retry import Retry
@@ -178,7 +179,7 @@ class UnixDomainSocketConnection(Connection):
class ConnectionPool:
@classmethod
def from_url(cls, url: str, *, db: int = ..., decode_components: bool = ..., **kwargs) -> ConnectionPool: ...
def from_url(cls: type[Self], url: str, *, db: int = ..., decode_components: bool = ..., **kwargs) -> Self: ...
connection_class: Any
connection_kwargs: Any
max_connections: Any