Skip to content

Commit

Permalink
Fix NotSet being an unknown import and unusable in call signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
ocket8888 committed Mar 2, 2022
1 parent 001970d commit fdb4b0d
Show file tree
Hide file tree
Showing 28 changed files with 380 additions and 378 deletions.
102 changes: 51 additions & 51 deletions github/AuthenticatedUser.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ from typing import Any, Dict, List, Optional, Union, NamedTuple
from github.Authorization import Authorization
from github.Event import Event
from github.Gist import Gist
from github.GithubObject import CompletableGithubObject, _NotSetType
from github.GithubObject import CompletableGithubObject, NotSetType
from github.InputFileContent import InputFileContent
from github.Invitation import Invitation
from github.Issue import Issue
Expand Down Expand Up @@ -48,57 +48,57 @@ class AuthenticatedUser(CompletableGithubObject):
def company(self) -> str: ...
def create_authorization(
self,
scopes: Union[List[str], _NotSetType] = ...,
note: Union[str, _NotSetType] = ...,
note_url: Union[str, _NotSetType] = ...,
client_id: Union[str, _NotSetType] = ...,
client_secret: Union[str, _NotSetType] = ...,
scopes: Union[List[str], NotSetType] = ...,
note: Union[str, NotSetType] = ...,
note_url: Union[str, NotSetType] = ...,
client_id: Union[str, NotSetType] = ...,
client_secret: Union[str, NotSetType] = ...,
onetime_password: Union[str, None] = ...,
) -> Authorization: ...
def create_fork(self, repo: Repository) -> Repository: ...
def create_gist(
self,
public: bool,
files: Dict[str, InputFileContent],
description: Union[str, _NotSetType] = ...,
description: Union[str, NotSetType] = ...,
) -> Gist: ...
def create_key(self, title: str, key: str) -> UserKey: ...
def create_migration(
self,
repos: List[str],
lock_repositories: Union[bool, _NotSetType] = ...,
exclude_attachments: Union[bool, _NotSetType] = ...,
lock_repositories: Union[bool, NotSetType] = ...,
exclude_attachments: Union[bool, NotSetType] = ...,
) -> Migration: ...
def create_repo(
self,
name: str,
description: Union[str, _NotSetType] = ...,
homepage: Union[str, _NotSetType] = ...,
private: Union[bool, _NotSetType] = ...,
has_issues: Union[bool, _NotSetType] = ...,
has_wiki: Union[bool, _NotSetType] = ...,
has_downloads: Union[bool, _NotSetType] = ...,
has_projects: Union[bool, _NotSetType] = ...,
auto_init: Union[bool, _NotSetType] = ...,
license_template: _NotSetType = ...,
gitignore_template: Union[str, _NotSetType] = ...,
allow_squash_merge: Union[bool, _NotSetType] = ...,
allow_merge_commit: Union[bool, _NotSetType] = ...,
allow_rebase_merge: Union[bool, _NotSetType] = ...,
description: Union[str, NotSetType] = ...,
homepage: Union[str, NotSetType] = ...,
private: Union[bool, NotSetType] = ...,
has_issues: Union[bool, NotSetType] = ...,
has_wiki: Union[bool, NotSetType] = ...,
has_downloads: Union[bool, NotSetType] = ...,
has_projects: Union[bool, NotSetType] = ...,
auto_init: Union[bool, NotSetType] = ...,
license_template: NotSetType = ...,
gitignore_template: Union[str, NotSetType] = ...,
allow_squash_merge: Union[bool, NotSetType] = ...,
allow_merge_commit: Union[bool, NotSetType] = ...,
allow_rebase_merge: Union[bool, NotSetType] = ...,
) -> Repository: ...
@property
def created_at(self) -> datetime: ...
@property
def disk_usage(self) -> int: ...
def edit(
self,
name: Union[str, _NotSetType] = ...,
email: Union[str, _NotSetType] = ...,
blog: Union[str, _NotSetType] = ...,
company: Union[str, _NotSetType] = ...,
location: Union[str, _NotSetType] = ...,
hireable: Union[bool, _NotSetType] = ...,
bio: Union[str, _NotSetType] = ...,
name: Union[str, NotSetType] = ...,
email: Union[str, NotSetType] = ...,
blog: Union[str, NotSetType] = ...,
company: Union[str, NotSetType] = ...,
location: Union[str, NotSetType] = ...,
hireable: Union[bool, NotSetType] = ...,
bio: Union[str, NotSetType] = ...,
) -> None: ...
@property
def email(self) -> str: ...
Expand All @@ -119,53 +119,53 @@ class AuthenticatedUser(CompletableGithubObject):
def get_followers(self) -> PaginatedList[NamedUser]: ...
def get_following(self) -> PaginatedList[NamedUser]: ...
def get_gists(
self, since: Union[datetime, _NotSetType] = ...
self, since: Union[datetime, NotSetType] = ...
) -> PaginatedList[Gist]: ...
def get_invitations(self) -> PaginatedList[Invitation]: ...
def get_issues(
self,
filter: Union[str, _NotSetType] = ...,
state: Union[str, _NotSetType] = ...,
labels: Union[List[Label], _NotSetType] = ...,
sort: Union[str, _NotSetType] = ...,
direction: Union[str, _NotSetType] = ...,
since: Union[_NotSetType, datetime] = ...,
filter: Union[str, NotSetType] = ...,
state: Union[str, NotSetType] = ...,
labels: Union[List[Label], NotSetType] = ...,
sort: Union[str, NotSetType] = ...,
direction: Union[str, NotSetType] = ...,
since: Union[NotSetType, datetime] = ...,
) -> PaginatedList[Issue]: ...
def get_key(self, id: int) -> UserKey: ...
def get_keys(self) -> PaginatedList[UserKey]: ...
def get_migrations(self) -> PaginatedList[Migration]: ...
def get_notification(self, id: str) -> Notification: ...
def get_notifications(
self,
all: Union[bool, _NotSetType] = ...,
participating: Union[bool, _NotSetType] = ...,
since: Union[datetime, _NotSetType] = ...,
before: Union[datetime, _NotSetType] = ...,
all: Union[bool, NotSetType] = ...,
participating: Union[bool, NotSetType] = ...,
since: Union[datetime, NotSetType] = ...,
before: Union[datetime, NotSetType] = ...,
) -> PaginatedList[Notification]: ...
def get_organization_events(self, org: Organization) -> PaginatedList[Event]: ...
def get_organization_membership(self, org: int) -> Membership: ...
def get_orgs(self) -> PaginatedList[Organization]: ...
def get_repo(self, name: str) -> Repository: ...
def get_repos(
self,
visibility: Union[str, _NotSetType] = ...,
affiliation: Union[str, _NotSetType] = ...,
type: Union[str, _NotSetType] = ...,
sort: Union[str, _NotSetType] = ...,
direction: Union[str, _NotSetType] = ...,
visibility: Union[str, NotSetType] = ...,
affiliation: Union[str, NotSetType] = ...,
type: Union[str, NotSetType] = ...,
sort: Union[str, NotSetType] = ...,
direction: Union[str, NotSetType] = ...,
) -> PaginatedList[Repository]: ...
def get_starred(self) -> PaginatedList[Repository]: ...
def get_starred_gists(self) -> PaginatedList[Gist]: ...
def get_subscriptions(self) -> PaginatedList[Repository]: ...
def get_teams(self) -> PaginatedList[Team]: ...
def get_user_issues(
self,
filter: Union[str, _NotSetType] = ...,
state: Union[str, _NotSetType] = ...,
labels: Union[List[Label], _NotSetType] = ...,
sort: Union[str, _NotSetType] = ...,
direction: Union[str, _NotSetType] = ...,
since: Union[_NotSetType, datetime] = ...,
filter: Union[str, NotSetType] = ...,
state: Union[str, NotSetType] = ...,
labels: Union[List[Label], NotSetType] = ...,
sort: Union[str, NotSetType] = ...,
direction: Union[str, NotSetType] = ...,
since: Union[NotSetType, datetime] = ...,
) -> PaginatedList[Issue]: ...
def get_watched(self) -> PaginatedList[Repository]: ...
@property
Expand Down
12 changes: 6 additions & 6 deletions github/Authorization.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ from datetime import datetime
from typing import Any, Dict, List, Optional, Union

from github.AuthorizationApplication import AuthorizationApplication
from github.GithubObject import CompletableGithubObject, _NotSetType
from github.GithubObject import CompletableGithubObject, NotSetType

class Authorization(CompletableGithubObject):
def __repr__(self) -> str: ...
Expand All @@ -15,11 +15,11 @@ class Authorization(CompletableGithubObject):
def delete(self) -> None: ...
def edit(
self,
scopes: Union[_NotSetType, List[str]] = ...,
add_scopes: Union[_NotSetType, List[str]] = ...,
remove_scopes: Union[_NotSetType, List[str]] = ...,
note: Union[_NotSetType, str] = ...,
note_url: Union[_NotSetType, str] = ...,
scopes: Union[NotSetType, List[str]] = ...,
add_scopes: Union[NotSetType, List[str]] = ...,
remove_scopes: Union[NotSetType, List[str]] = ...,
note: Union[NotSetType, str] = ...,
note_url: Union[NotSetType, str] = ...,
) -> None: ...
@property
def id(self) -> int: ...
Expand Down
36 changes: 18 additions & 18 deletions github/Branch.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ from typing import Any, Dict, List, Union

from github.BranchProtection import BranchProtection
from github.Commit import Commit
from github.GithubObject import NonCompletableGithubObject, _NotSetType
from github.GithubObject import NonCompletableGithubObject, NotSetType
from github.NamedUser import NamedUser
from github.PaginatedList import PaginatedList
from github.RequiredPullRequestReviews import RequiredPullRequestReviews
Expand All @@ -18,29 +18,29 @@ class Branch(NonCompletableGithubObject):
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]] = ...,
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] = ...,
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] = ...,
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: ...
Expand Down
22 changes: 11 additions & 11 deletions github/CheckRun.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ from typing import Any, Dict, List, Union
from github.CheckRunAnnotation import CheckRunAnnotation
from github.CheckRunOutput import CheckRunOutput
from github.GithubApp import GithubApp
from github.GithubObject import CompletableGithubObject, _NotSetType
from github.GithubObject import CompletableGithubObject, NotSetType
from github.PaginatedList import PaginatedList
from github.PullRequest import PullRequest

Expand All @@ -15,18 +15,18 @@ class CheckRun(CompletableGithubObject):
def get_annotations(self) -> PaginatedList[CheckRunAnnotation]: ...
def edit(
self,
name: Union[_NotSetType, str] = ...,
head_sha: Union[_NotSetType, str] = ...,
details_url: Union[_NotSetType, str] = ...,
external_id: Union[_NotSetType, str] = ...,
status: Union[_NotSetType, str] = ...,
started_at: Union[_NotSetType, datetime] = ...,
conclusion: Union[_NotSetType, str] = ...,
completed_at: Union[_NotSetType, datetime] = ...,
name: Union[NotSetType, str] = ...,
head_sha: Union[NotSetType, str] = ...,
details_url: Union[NotSetType, str] = ...,
external_id: Union[NotSetType, str] = ...,
status: Union[NotSetType, str] = ...,
started_at: Union[NotSetType, datetime] = ...,
conclusion: Union[NotSetType, str] = ...,
completed_at: Union[NotSetType, datetime] = ...,
output: Union[
_NotSetType, Dict[str, Union[str, List[Dict[str, Union[str, int]]]]]
NotSetType, Dict[str, Union[str, List[Dict[str, Union[str, int]]]]]
] = ...,
actions: Union[_NotSetType, List[Dict[str, str]]] = ...,
actions: Union[NotSetType, List[Dict[str, str]]] = ...,
) -> None: ...
@property
def app(self) -> GithubApp: ...
Expand Down
24 changes: 12 additions & 12 deletions github/Commit.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ from github.CommitStats import CommitStats
from github.CommitStatus import CommitStatus
from github.File import File
from github.GitCommit import GitCommit
from github.GithubObject import CompletableGithubObject, _NotSetType
from github.GithubObject import CompletableGithubObject, NotSetType
from github.NamedUser import NamedUser
from github.PaginatedList import PaginatedList
from github.PullRequest import PullRequest
Expand All @@ -30,33 +30,33 @@ class Commit(CompletableGithubObject):
def create_comment(
self,
body: str,
line: Union[int, _NotSetType] = ...,
path: Union[_NotSetType, str] = ...,
position: Union[int, _NotSetType] = ...,
line: Union[int, NotSetType] = ...,
path: Union[NotSetType, str] = ...,
position: Union[int, NotSetType] = ...,
) -> CommitComment: ...
def create_status(
self,
state: str,
target_url: Union[_NotSetType, str] = ...,
description: Union[_NotSetType, str] = ...,
context: Union[_NotSetType, str] = ...,
target_url: Union[NotSetType, str] = ...,
description: Union[NotSetType, str] = ...,
context: Union[NotSetType, str] = ...,
) -> CommitStatus: ...
@property
def files(self) -> List[File]: ...
def get_check_suites(
self,
app_id: Union[_NotSetType, int],
check_name: Union[_NotSetType, str],
app_id: Union[NotSetType, int],
check_name: Union[NotSetType, str],
) -> PaginatedList[CheckSuite]: ...
def get_combined_status(self) -> CommitCombinedStatus: ...
def get_comments(self) -> PaginatedList[CommitComment]: ...
def get_statuses(self) -> PaginatedList[CommitStatus]: ...
def get_pulls(self) -> PaginatedList[PullRequest]: ...
def get_check_runs(
self,
check_name: Union[_NotSetType, str] = ...,
status: Union[_NotSetType, str] = ...,
filter: Union[_NotSetType, str] = ...,
check_name: Union[NotSetType, str] = ...,
status: Union[NotSetType, str] = ...,
filter: Union[NotSetType, str] = ...,
) -> PaginatedList[CheckRun]: ...
@property
def html_url(self) -> str: ...
Expand Down
12 changes: 6 additions & 6 deletions github/Deployment.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ from datetime import datetime
from typing import Any, Dict, Union

from github.DeploymentStatus import DeploymentStatus
from github.GithubObject import CompletableGithubObject, _NotSetType
from github.GithubObject import CompletableGithubObject, NotSetType
from github.NamedUser import NamedUser
from github.PaginatedList import PaginatedList

Expand All @@ -17,11 +17,11 @@ class Deployment(CompletableGithubObject):
def create_status(
self,
state: str,
target_url: Union[str, _NotSetType] = ...,
description: Union[str, _NotSetType] = ...,
environment: Union[str, _NotSetType] = ...,
environment_url: Union[str, _NotSetType] = ...,
auto_inactive: Union[bool, _NotSetType] = ...,
target_url: Union[str, NotSetType] = ...,
description: Union[str, NotSetType] = ...,
environment: Union[str, NotSetType] = ...,
environment_url: Union[str, NotSetType] = ...,
auto_inactive: Union[bool, NotSetType] = ...,
) -> DeploymentStatus: ...
@property
def id(self) -> int: ...
Expand Down
6 changes: 3 additions & 3 deletions github/Gist.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ from typing import Any, Dict, List, Optional, Union
from github.GistComment import GistComment
from github.GistFile import GistFile
from github.GistHistoryState import GistHistoryState
from github.GithubObject import CompletableGithubObject, _NotSetType
from github.GithubObject import CompletableGithubObject, NotSetType
from github.InputFileContent import InputFileContent
from github.NamedUser import NamedUser
from github.PaginatedList import PaginatedList
Expand All @@ -28,8 +28,8 @@ class Gist(CompletableGithubObject):
def description(self) -> Optional[str]: ...
def edit(
self,
description: Union[_NotSetType, str] = ...,
files: Union[_NotSetType, Dict[str, Optional[InputFileContent]]] = ...,
description: Union[NotSetType, str] = ...,
files: Union[NotSetType, Dict[str, Optional[InputFileContent]]] = ...,
) -> None: ...
@property
def files(self) -> Dict[str, GistFile]: ...
Expand Down

0 comments on commit fdb4b0d

Please sign in to comment.