From 784a3efd68cbfd7676bc545b0c52b511eee9b3dd Mon Sep 17 00:00:00 2001 From: Enrico Minack Date: Tue, 25 Oct 2022 05:34:46 +0200 Subject: [PATCH] Add retry and pool_size to typing (#2151) --- github/MainClass.pyi | 5 +++-- github/Requester.pyi | 11 +++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/github/MainClass.pyi b/github/MainClass.pyi index a757e9e28b..62b84e238a 100644 --- a/github/MainClass.pyi +++ b/github/MainClass.pyi @@ -22,7 +22,7 @@ from github.RateLimit import RateLimit from github.Repository import Repository from github.Topic import Topic -# from urllib3.util.retry import Retry +from urllib3.util import Retry TGithubObject = TypeVar("TGithubObject", bound=GithubObject) @@ -39,7 +39,8 @@ class Github: user_agent: str = ..., per_page: int = ..., verify: bool = ..., - retry: Any = ..., + retry: Optional[Union[int, Retry]] = ..., + pool_size: Optional[int] = ..., ) -> None: ... @property def FIX_REPO_GET_GIT_REF(self) -> bool: ... diff --git a/github/Requester.pyi b/github/Requester.pyi index f97220c136..381fae929b 100644 --- a/github/Requester.pyi +++ b/github/Requester.pyi @@ -6,7 +6,7 @@ from requests.models import Response from github.GithubObject import GithubObject -# from urllib3.util.retry import Retry +from urllib3.util import Retry class HTTPRequestsConnectionClass: def __init__( @@ -15,7 +15,8 @@ class HTTPRequestsConnectionClass: port: Optional[int] = ..., strict: bool = ..., timeout: Optional[int] = ..., - retry: Any = ..., + retry: Optional[Union[int, Retry]] = ..., + pool_size: Optional[int] = ..., **kwargs: str ) -> None: ... def close(self) -> None: ... @@ -31,7 +32,8 @@ class HTTPSRequestsConnectionClass: port: Optional[int] = ..., strict: bool = ..., timeout: Optional[int] = ..., - retry: Any = ..., + retry: Optional[Union[int, Retry]] = ..., + pool_size: Optional[int] = ..., **kwargs: str ) -> None: ... def close(self) -> None: ... @@ -120,7 +122,8 @@ class Requester: user_agent: str, per_page: int, verify: bool, - retry: Any, + retry: Optional[Union[int, Retry]], + pool_size: Optional[int], ) -> None: ... def _initializeDebugFeature(self) -> None: ... def check_me(self, obj: GithubObject) -> None: ...