Created
September 18, 2019 16:49
-
-
Save zer0tonin/fd7e636753f95fa64784e74d142ef436 to your computer and use it in GitHub Desktop.
Pygithub stubbing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github.AuthenticatedUser | |
github.Authorization | |
github.AuthorizationApplication | |
github.Branch | |
github.BranchProtection | |
github.Clones | |
github.Commit | |
github.CommitCombinedStatus | |
github.CommitComment | |
github.CommitStats | |
github.CommitStatus | |
github.Comparison | |
github.ContentFile | |
github.Download | |
github.Event | |
github.File | |
github.Gist | |
github.GistComment | |
github.GistFile | |
github.GistHistoryState | |
github.GitAuthor | |
github.GitBlob | |
github.GitCommit | |
github.GitObject | |
github.GitRef | |
github.GitRelease | |
github.GitReleaseAsset | |
github.GitTag | |
github.GitTree | |
github.GitTreeElement | |
github.GithubException | |
github.GithubObject | |
github.GitignoreTemplate | |
github.Hook | |
github.HookDescription | |
github.HookResponse | |
github.InputFileContent | |
github.InputGitAuthor | |
github.InputGitTreeElement | |
github.Installation | |
github.InstallationAuthorization | |
github.Invitation | |
github.Issue | |
github.IssueComment | |
github.IssueEvent | |
github.IssuePullRequest | |
github.Label | |
github.License | |
github.MainClass | |
github.Migration | |
github.Milestone | |
github.NamedUser | |
github.Notification | |
github.NotificationSubject | |
github.Organization | |
github.PaginatedList | |
github.Path | |
github.Permissions | |
github.Plan | |
github.Project | |
github.ProjectCard | |
github.ProjectColumn | |
github.PullRequest | |
github.PullRequestComment | |
github.PullRequestMergeStatus | |
github.PullRequestPart | |
github.PullRequestReview | |
github.Rate | |
github.RateLimit | |
github.Reaction | |
github.Referrer | |
github.Repository | |
github.RepositoryKey | |
github.Requester | |
github.RequiredPullRequestReviews | |
github.RequiredStatusChecks | |
github.SourceImport | |
github.Stargazer | |
github.StatsCodeFrequency | |
github.StatsCommitActivity | |
github.StatsContributor | |
github.StatsParticipation | |
github.StatsPunchCard | |
github.Tag | |
github.Team | |
github.Topic | |
github.UserKey | |
tests.AuthenticatedUser | |
tests.Authentication | |
tests.Authorization | |
tests.BadAttributes | |
tests.Branch | |
tests.BranchProtection | |
tests.Commit | |
tests.CommitCombinedStatus | |
tests.CommitComment | |
tests.CommitStatus | |
tests.ConditionalRequestUpdate | |
tests.ContentFile | |
tests.Download | |
tests.Enterprise | |
tests.Equality | |
tests.Event | |
tests.Exceptions | |
tests.ExposeAllAttributes | |
tests.Framework | |
tests.Gist | |
tests.GistComment | |
tests.GitBlob | |
tests.GitCommit | |
tests.GitRef | |
tests.GitRelease | |
tests.GitReleaseAsset | |
tests.GitTag | |
tests.GitTree | |
tests.GithubIntegration | |
tests.Github_ | |
tests.Hook | |
tests.Issue | |
tests.Issue131 | |
tests.Issue133 | |
tests.Issue134 | |
tests.Issue139 | |
tests.Issue140 | |
tests.Issue142 | |
tests.Issue158 | |
tests.Issue174 | |
tests.Issue214 | |
tests.Issue216 | |
tests.Issue278 | |
tests.Issue33 | |
tests.Issue494 | |
tests.Issue50 | |
tests.Issue54 | |
tests.Issue572 | |
tests.Issue80 | |
tests.Issue823 | |
tests.Issue87 | |
tests.Issue937 | |
tests.Issue945 | |
tests.IssueComment | |
tests.IssueEvent | |
tests.Label | |
tests.License | |
tests.Logging_ | |
tests.Markdown | |
tests.Migration | |
tests.Milestone | |
tests.NamedUser | |
tests.Notification | |
tests.Organization | |
tests.OrganizationHasInMembers | |
tests.PaginatedList | |
tests.Persistence | |
tests.Project | |
tests.PullRequest | |
tests.PullRequestComment | |
tests.PullRequestFile | |
tests.PullRequestReview | |
tests.RateLimiting | |
tests.RawData | |
tests.Reaction | |
tests.Repository | |
tests.RepositoryKey | |
tests.RequiredPullRequestReviews | |
tests.RequiredStatusChecks | |
tests.Retry | |
tests.Search | |
tests.SourceImport | |
tests.Tag | |
tests.Team | |
tests.Time | |
tests.Traffic | |
tests.UserKey |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from subprocess import Popen | |
import re | |
regex = re.compile(r"github\.(.*)") | |
with open('list_modules') as modules: | |
module = modules.readline() | |
while module: | |
module = module.strip() | |
match = regex.findall(module) | |
if not match: | |
continue | |
file_name = "github/{0}.piy".format(match[0]) | |
with open(file_name, 'a+') as output_file: | |
Popen(['monkeytype', 'stub', module], stdout=output_file) | |
module = modules.readline() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment