mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 10:51:14 +00:00
Correct Repository.create_pull typing harder (#1635)
It turns out if an argument is optional for an overloaded method, the type hints require the default argument specified to successfully match against the correct signature. Furthermore, the second kind of create_pull() does not support the draft argument at all, so remove it. Fixes #1634
This commit is contained in:
@@ -181,9 +181,9 @@ class Repository(CompletableGithubObject):
|
||||
) -> Milestone: ...
|
||||
def create_project(self, name: str, body: str = ...) -> Project: ...
|
||||
@overload
|
||||
def create_pull(self, title: str, body: str, base: str, head: str, maintainer_can_modify: Union[bool, _NotSetType], draft: bool, issue: _NotSetType) -> PullRequest: ...
|
||||
def create_pull(self, title: str, body: str, base: str, head: str, maintainer_can_modify: Union[bool, _NotSetType] = _NotSetType(), draft: bool = False, issue: _NotSetType = _NotSetType()) -> PullRequest: ...
|
||||
@overload
|
||||
def create_pull(self, title: _NotSetType, body: _NotSetType, base: str, head: str, maintainer_can_modify: _NotSetType, draft: bool, issue: Issue) -> PullRequest: ...
|
||||
def create_pull(self, title: _NotSetType, body: _NotSetType, base: str, head: str, maintainer_can_modify: _NotSetType, issue: Issue) -> PullRequest: ...
|
||||
def create_repository_dispatch(
|
||||
self, event_type: str, client_payload: Dict[str, str]
|
||||
) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user