From f41c046f0e05aa8d6ea34813116d0dfc97ddd73d Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Sat, 23 May 2020 16:04:06 +1000 Subject: [PATCH] Correct Workflow typing (#1533) When Workflow support was added, the method calls were not added to the typing file for Repository, and somehow the class name for the Workflow typing file was incorrect. --- github/Repository.pyi | 3 +++ github/Workflow.pyi | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/github/Repository.pyi b/github/Repository.pyi index 9192175b..e0380e83 100644 --- a/github/Repository.pyi +++ b/github/Repository.pyi @@ -48,6 +48,7 @@ from github.StatsPunchCard import StatsPunchCard from github.Tag import Tag from github.Team import Team from github.View import View +from github.Workflow import Workflow class Repository(CompletableGithubObject): def __repr__(self) -> str: ... @@ -381,6 +382,8 @@ class Repository(CompletableGithubObject): ) -> Dict[str, Union[int, List[View]]]: ... def get_vulnerability_alert(self) -> bool: ... def get_watchers(self) -> PaginatedList[NamedUser]: ... + def get_workflow(self, id_or_name: Union[str, int]) -> Workflow: ... + def get_workflows(self) -> PaginatedList[Workflow]: ... @property def git_commits_url(self) -> str: ... @property diff --git a/github/Workflow.pyi b/github/Workflow.pyi index 1f0b9e65..2e172941 100644 --- a/github/Workflow.pyi +++ b/github/Workflow.pyi @@ -3,7 +3,7 @@ from typing import Any, Dict from github.GithubObject import CompletableGithubObject -class Deployment(CompletableGithubObject): +class Workflow(CompletableGithubObject): def __repr__(self) -> str: ... def _initAttributes(self) -> None: ... def _useAttributes(self, attributes: Dict[str, Any]) -> None: ...