From 165d995da2e3f5900aed49a261fbf12ec537fa40 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Thu, 6 Aug 2020 21:56:09 +1000 Subject: [PATCH] Correct **kwargs typing for search_* (#1636) It turns out typing for **kwargs is always Dict[str, Type], so only the type is required. Fixes #1633 --- github/MainClass.pyi | 12 ++++++------ github/Requester.pyi | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/github/MainClass.pyi b/github/MainClass.pyi index 300ba284..9cbc7d3b 100644 --- a/github/MainClass.pyi +++ b/github/MainClass.pyi @@ -102,40 +102,40 @@ class Github: sort: Union[str, _NotSetType] = ..., order: Union[str, _NotSetType] = ..., highlight: bool = ..., - **qualifiers: Dict[str, Any] + **qualifiers: Any ) -> PaginatedList[ContentFile]: ... def search_commits( self, query: str, sort: Union[str, _NotSetType] = ..., order: Union[str, _NotSetType] = ..., - **qualifiers: Dict[str, Any] + **qualifiers: Any ) -> PaginatedList[Commit]: ... def search_issues( self, query: str, sort: Union[str, _NotSetType] = ..., order: Union[str, _NotSetType] = ..., - **qualifiers: Dict[str, Any] + **qualifiers: Any ) -> PaginatedList[Issue]: ... def search_repositories( self, query: str, sort: Union[str, _NotSetType] = ..., order: Union[str, _NotSetType] = ..., - **qualifiers: Dict[str, Any] + **qualifiers: Any ) -> PaginatedList[Repository]: ... def search_topics( self, query: str, - **qualifiers: Dict[str, Any] + **qualifiers: Any ) -> PaginatedList[Topic]: ... def search_users( self, query: str, sort: Union[str, _NotSetType] = ..., order: Union[str, _NotSetType] = ..., - **qualifiers: Dict[str, Any] + **qualifiers: Any ) -> PaginatedList[NamedUser]: ... class GithubIntegration: diff --git a/github/Requester.pyi b/github/Requester.pyi index 78f117a3..53cc9a38 100644 --- a/github/Requester.pyi +++ b/github/Requester.pyi @@ -17,7 +17,7 @@ class HTTPRequestsConnectionClass: strict: bool = ..., timeout: Optional[int] = ..., retry: Any = ..., - **kwargs: Dict[str, str] + **kwargs: str ) -> None: ... def close(self) -> None: ... def getresponse(self) -> RequestsResponse: ... @@ -33,7 +33,7 @@ class HTTPSRequestsConnectionClass: strict: bool = ..., timeout: Optional[int] = ..., retry: Any = ..., - **kwargs: Dict[str, str] + **kwargs: str ) -> None: ... def close(self) -> None: ... def getresponse(self) -> RequestsResponse: ...