Files
PyGithub/github/Branch.pyi
T
Alice GIRARDandLiuyang Wan 91433fe925 Type stubs for mypy (#1231)
* First attempt at stubs

* fix AuthenticatedUser.piy

* fix PullRequest.piy

* fix Authorization.piy

* fix Branch.piy

* fix Clones.piy

* fix Commit.piy

* fix CommitCombinedStatus.piy

* fix CommitComment.piy

* fix CommitStatus.piy

* fix ContentFile.piy

* fix Download.piy

* fix Event.piy

* fix File.piy

* fix Gist.piy

* fix GistComment.piy

* fix GistFile.piy

* fix GitAuthor.piy

* fix GitBlob.piy

* fix GitCommit.piy

* fix GitRef.piy

* fix GitRelease.piy

* renamed stubs into pyi files

* fix Notification

* fix Repository

* fix GitReleaseAsset

* fix GitTag

* fix GitTree

* fix GitTreeElement

* fix GithubException

* fix GithubObject

* fix GitignoreTemplate

* fix HookDescription

* fix HookResponse

* fix InputGitAuthor

* fix Installation

* fix InstallationAuthorization

* fix Invitation

* fix Issue

* fix IssueComment

* Fix random issues found while testing

* fix IssuePullRequest

* fix Label

* fix License

* fix Migration

* fix Milestone

* fix NamedUser

* fix NotificationSubject

* fix Organization

* fix PaginatedList

* fix Path

* fix Permissions

* fix Plan

* fix Project

* fix ProjectCard

* fix ProjectColumn

* fix PullRequestComment

* fix PullRequestMergeStatus

* fix PullRequestPart

* fix PullRequestReview

* fix Rate

* fix RateLimit

* fix Reaction

* fix Referrer

* fix RepositoryKey

* fix RequiredPullRequestReviews

* fix RequiredStatusChecks

* fix SourceImport

* fix Stargazer

* fix StatsCodeFrequency

* fix StatsCommitActivity

* fix StatsContributor

* fix Tag

* fix Team

* fix Topic

* fix UserKey

* fix MainClass

* fix Requester

* added stubs for View

* added stubs for Membership

* various syntax errors

* silence mypy noise

* keeping track of recent changes

* black + isort

Co-authored-by: Liuyang Wan <lwan@zendesk.com>
2020-03-22 19:33:23 +08:00

65 lines
2.9 KiB
Python

from typing import Any, Dict, List, Union
from github.BranchProtection import BranchProtection
from github.Commit import Commit
from github.GithubObject import _NotSetType
from github.PaginatedList import PaginatedList
from github.RequiredPullRequestReviews import RequiredPullRequestReviews
from github.RequiredStatusChecks import RequiredStatusChecks
class Branch:
def __repr__(self) -> str: ...
def _initAttributes(self) -> None: ...
def _useAttributes(self, attributes: Dict[str, Any]) -> None: ...
def add_required_signatures(self) -> None: ...
@property
def commit(self) -> Commit: ...
def edit_protection(
self,
strict: Union[bool, _NotSetType] = ...,
contexts: Union[List[str], _NotSetType] = ...,
enforce_admins: Union[bool, _NotSetType] = ...,
dismissal_users: Union[_NotSetType, List[str]] = ...,
dismissal_teams: Union[_NotSetType, List[str]] = ...,
dismiss_stale_reviews: Union[bool, _NotSetType] = ...,
require_code_owner_reviews: Union[bool, _NotSetType] = ...,
required_approving_review_count: Union[int, _NotSetType] = ...,
user_push_restrictions: Union[_NotSetType, List[str]] = ...,
team_push_restrictions: Union[_NotSetType, List[str]] = ...,
) -> None: ...
def edit_required_pull_request_reviews(
self,
dismissal_users: Union[_NotSetType, List[str]] = ...,
dismissal_teams: Union[_NotSetType, List[str]] = ...,
dismiss_stale_reviews: Union[bool, _NotSetType] = ...,
require_code_owner_reviews: Union[_NotSetType, bool] = ...,
required_approving_review_count: Union[int, _NotSetType] = ...,
) -> None: ...
def edit_required_status_checks(
self,
strict: Union[_NotSetType, bool] = ...,
contexts: Union[List[str], _NotSetType] = ...,
) -> None: ...
def edit_team_push_restrictions(self, *teams: str) -> None: ...
def edit_user_push_restrictions(self, *users: str) -> None: ...
def get_admin_enforcement(self) -> bool: ...
def get_protection(self) -> BranchProtection: ...
def get_required_pull_request_reviews(self) -> RequiredPullRequestReviews: ...
def get_required_signatures(self) -> bool: ...
def get_required_status_checks(self) -> RequiredStatusChecks: ...
def get_team_push_restrictions(self) -> PaginatedList: ...
def get_user_push_restrictions(self) -> PaginatedList: ...
@property
def name(self) -> str: ...
@property
def protected(self) -> bool: ...
@property
def protection_url(self) -> str: ...
def remove_admin_enforcement(self) -> None: ...
def remove_protection(self) -> None: ...
def remove_push_restrictions(self) -> None: ...
def remove_required_pull_request_reviews(self) -> None: ...
def remove_required_signatures(self) -> None: ...
def remove_required_status_checks(self) -> None: ...
def set_admin_enforcement(self) -> None: ...