PyGithub-asyncio 3.0.0b1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- githubasyncio/AccessToken.py +159 -0
- githubasyncio/AdvisoryBase.py +163 -0
- githubasyncio/AdvisoryCredit.py +131 -0
- githubasyncio/AdvisoryCreditDetailed.py +110 -0
- githubasyncio/AdvisoryVulnerability.py +191 -0
- githubasyncio/AdvisoryVulnerabilityPackage.py +93 -0
- githubasyncio/AppAuthentication.py +58 -0
- githubasyncio/ApplicationOAuth.py +200 -0
- githubasyncio/Artifact.py +183 -0
- githubasyncio/Auth.py +560 -0
- githubasyncio/AuthenticatedUser.py +1251 -0
- githubasyncio/Authorization.py +192 -0
- githubasyncio/AuthorizationApplication.py +73 -0
- githubasyncio/Autolink.py +104 -0
- githubasyncio/Branch.py +689 -0
- githubasyncio/BranchProtection.py +224 -0
- githubasyncio/CVSS.py +83 -0
- githubasyncio/CWE.py +75 -0
- githubasyncio/CheckRun.py +315 -0
- githubasyncio/CheckRunAnnotation.py +134 -0
- githubasyncio/CheckRunOutput.py +108 -0
- githubasyncio/CheckSuite.py +319 -0
- githubasyncio/Clones.py +97 -0
- githubasyncio/CodeScanAlert.py +215 -0
- githubasyncio/CodeScanAlertInstance.py +134 -0
- githubasyncio/CodeScanAlertInstanceLocation.py +102 -0
- githubasyncio/CodeScanRule.py +134 -0
- githubasyncio/CodeScanTool.py +94 -0
- githubasyncio/CodeSecurityConfig.py +301 -0
- githubasyncio/CodeSecurityConfigRepository.py +70 -0
- githubasyncio/Commit.py +442 -0
- githubasyncio/CommitCombinedStatus.py +126 -0
- githubasyncio/CommitComment.py +270 -0
- githubasyncio/CommitStats.py +78 -0
- githubasyncio/CommitStatus.py +169 -0
- githubasyncio/Comparison.py +219 -0
- githubasyncio/Consts.py +197 -0
- githubasyncio/ContentFile.py +304 -0
- githubasyncio/Copilot.py +97 -0
- githubasyncio/CopilotSeat.py +132 -0
- githubasyncio/DefaultCodeSecurityConfig.py +93 -0
- githubasyncio/DependabotAlert.py +184 -0
- githubasyncio/DependabotAlertAdvisory.py +82 -0
- githubasyncio/DependabotAlertDependency.py +100 -0
- githubasyncio/DependabotAlertVulnerability.py +85 -0
- githubasyncio/Deployment.py +314 -0
- githubasyncio/DeploymentBranchPolicy.py +102 -0
- githubasyncio/DeploymentStatus.py +201 -0
- githubasyncio/DiscussionBase.py +140 -0
- githubasyncio/DiscussionCommentBase.py +140 -0
- githubasyncio/Download.py +256 -0
- githubasyncio/Enterprise.py +175 -0
- githubasyncio/EnterpriseConsumedLicenses.py +138 -0
- githubasyncio/Environment.py +354 -0
- githubasyncio/EnvironmentDeploymentBranchPolicy.py +87 -0
- githubasyncio/EnvironmentProtectionRule.py +117 -0
- githubasyncio/EnvironmentProtectionRuleReviewer.py +110 -0
- githubasyncio/Event.py +134 -0
- githubasyncio/File.py +142 -0
- githubasyncio/GeneratedReleaseNotes.py +68 -0
- githubasyncio/Gist.py +373 -0
- githubasyncio/GistComment.py +162 -0
- githubasyncio/GistFile.py +106 -0
- githubasyncio/GistHistoryState.py +245 -0
- githubasyncio/GitAuthor.py +94 -0
- githubasyncio/GitBlob.py +123 -0
- githubasyncio/GitCommit.py +208 -0
- githubasyncio/GitCommitVerification.py +103 -0
- githubasyncio/GitObject.py +84 -0
- githubasyncio/GitRef.py +122 -0
- githubasyncio/GitRelease.py +476 -0
- githubasyncio/GitReleaseAsset.py +232 -0
- githubasyncio/GitTag.py +143 -0
- githubasyncio/GitTree.py +113 -0
- githubasyncio/GitTreeElement.py +104 -0
- githubasyncio/GithubApp.py +236 -0
- githubasyncio/GithubException.py +226 -0
- githubasyncio/GithubIntegration.py +365 -0
- githubasyncio/GithubObject.py +910 -0
- githubasyncio/GithubRetry.py +253 -0
- githubasyncio/GitignoreTemplate.py +88 -0
- githubasyncio/GlobalAdvisory.py +141 -0
- githubasyncio/Hook.py +238 -0
- githubasyncio/HookDelivery.py +243 -0
- githubasyncio/HookDescription.py +85 -0
- githubasyncio/HookResponse.py +83 -0
- githubasyncio/InputFileContent.py +63 -0
- githubasyncio/InputGitAuthor.py +71 -0
- githubasyncio/InputGitTreeElement.py +79 -0
- githubasyncio/Installation.py +298 -0
- githubasyncio/InstallationAuthorization.py +138 -0
- githubasyncio/Invitation.py +171 -0
- githubasyncio/Issue.py +955 -0
- githubasyncio/IssueComment.py +309 -0
- githubasyncio/IssueDependenciesSummary.py +77 -0
- githubasyncio/IssueEvent.py +296 -0
- githubasyncio/IssuePullRequest.py +97 -0
- githubasyncio/IssueType.py +123 -0
- githubasyncio/Label.py +186 -0
- githubasyncio/License.py +169 -0
- githubasyncio/MainClass.py +1142 -0
- githubasyncio/Membership.py +154 -0
- githubasyncio/MergedUpstream.py +71 -0
- githubasyncio/Migration.py +281 -0
- githubasyncio/Milestone.py +255 -0
- githubasyncio/NamedEnterpriseUser.py +207 -0
- githubasyncio/NamedUser.py +841 -0
- githubasyncio/Notification.py +182 -0
- githubasyncio/NotificationSubject.py +96 -0
- githubasyncio/Organization.py +2462 -0
- githubasyncio/OrganizationCodeScanAlert.py +65 -0
- githubasyncio/OrganizationCustomProperty.py +215 -0
- githubasyncio/OrganizationDependabotAlert.py +75 -0
- githubasyncio/OrganizationSecret.py +191 -0
- githubasyncio/OrganizationSecretScanAlert.py +112 -0
- githubasyncio/OrganizationVariable.py +141 -0
- githubasyncio/PaginatedList.py +652 -0
- githubasyncio/Path.py +102 -0
- githubasyncio/Permissions.py +113 -0
- githubasyncio/Plan.py +108 -0
- githubasyncio/Project.py +286 -0
- githubasyncio/ProjectCard.py +257 -0
- githubasyncio/ProjectColumn.py +227 -0
- githubasyncio/PublicKey.py +138 -0
- githubasyncio/PullRequest.py +1202 -0
- githubasyncio/PullRequestComment.py +401 -0
- githubasyncio/PullRequestMergeStatus.py +89 -0
- githubasyncio/PullRequestPart.py +110 -0
- githubasyncio/PullRequestReview.py +214 -0
- githubasyncio/Rate.py +123 -0
- githubasyncio/RateLimit.py +210 -0
- githubasyncio/RateLimitOverview.py +104 -0
- githubasyncio/Reaction.py +128 -0
- githubasyncio/Referrer.py +94 -0
- githubasyncio/RepoCodeSecurityConfig.py +93 -0
- githubasyncio/Repository.py +5211 -0
- githubasyncio/RepositoryAdvisory.py +431 -0
- githubasyncio/RepositoryDiscussion.py +221 -0
- githubasyncio/RepositoryDiscussionCategory.py +150 -0
- githubasyncio/RepositoryDiscussionComment.py +159 -0
- githubasyncio/RepositoryKey.py +166 -0
- githubasyncio/RepositoryPreferences.py +82 -0
- githubasyncio/RepositoryRulesetBypassActor.py +75 -0
- githubasyncio/Requester.py +1518 -0
- githubasyncio/RequiredPullRequestReviews.py +269 -0
- githubasyncio/RequiredStatusChecks.py +153 -0
- githubasyncio/Rule.py +134 -0
- githubasyncio/Ruleset.py +292 -0
- githubasyncio/Secret.py +139 -0
- githubasyncio/SecretScanAlert.py +317 -0
- githubasyncio/SecretScanAlertInstance.py +128 -0
- githubasyncio/SecurityAndAnalysis.py +188 -0
- githubasyncio/SecurityAndAnalysisFeature.py +79 -0
- githubasyncio/SelfHostedActionsRunner.py +129 -0
- githubasyncio/SelfHostedActionsRunnerApplication.py +92 -0
- githubasyncio/SelfHostedActionsRunnerJitConfig.py +74 -0
- githubasyncio/SelfHostedActionsRunnerToken.py +118 -0
- githubasyncio/SourceImport.py +260 -0
- githubasyncio/Stargazer.py +88 -0
- githubasyncio/StatsCodeFrequency.py +81 -0
- githubasyncio/StatsCommitActivity.py +86 -0
- githubasyncio/StatsContributor.py +138 -0
- githubasyncio/StatsParticipation.py +78 -0
- githubasyncio/StatsPunchCard.py +76 -0
- githubasyncio/SubIssueSummary.py +70 -0
- githubasyncio/Tag.py +108 -0
- githubasyncio/Team.py +618 -0
- githubasyncio/TeamDiscussion.py +137 -0
- githubasyncio/TimelineEvent.py +164 -0
- githubasyncio/TimelineEventSource.py +81 -0
- githubasyncio/Topic.py +177 -0
- githubasyncio/Traffic.py +95 -0
- githubasyncio/UserKey.py +141 -0
- githubasyncio/Variable.py +155 -0
- githubasyncio/View.py +97 -0
- githubasyncio/Workflow.py +335 -0
- githubasyncio/WorkflowJob.py +253 -0
- githubasyncio/WorkflowRun.py +480 -0
- githubasyncio/WorkflowStep.py +118 -0
- githubasyncio/__init__.py +38 -0
- githubasyncio/compat/__init__.py +52 -0
- githubasyncio/requestlib/__init__.py +29 -0
- pygithub_asyncio-3.0.0b1.dist-info/METADATA +102 -0
- pygithub_asyncio-3.0.0b1.dist-info/RECORD +188 -0
- pygithub_asyncio-3.0.0b1.dist-info/WHEEL +5 -0
- pygithub_asyncio-3.0.0b1.dist-info/licenses/COPYING +674 -0
- pygithub_asyncio-3.0.0b1.dist-info/licenses/COPYING.LESSER +165 -0
- pygithub_asyncio-3.0.0b1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
# FILE AUTO GENERATED DO NOT TOUCH
|
|
2
|
+
############################ Copyrights and license ############################
|
|
3
|
+
# #
|
|
4
|
+
# Copyright 2018 Hayden Fuss <wifu1234@gmail.com> #
|
|
5
|
+
# Copyright 2018 Wan Liuyang <tsfdye@gmail.com> #
|
|
6
|
+
# Copyright 2019 Steve Kowalik <steven@wedontsleep.org> #
|
|
7
|
+
# Copyright 2019 Wan Liuyang <tsfdye@gmail.com> #
|
|
8
|
+
# Copyright 2020 Steve Kowalik <steven@wedontsleep.org> #
|
|
9
|
+
# Copyright 2021 Mark Walker <mark.walker@realbuzz.com> #
|
|
10
|
+
# Copyright 2021 Steve Kowalik <steven@wedontsleep.org> #
|
|
11
|
+
# Copyright 2023 Enrico Minack <github@enrico.minack.dev> #
|
|
12
|
+
# Copyright 2023 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
|
|
13
|
+
# Copyright 2023 Trim21 <trim21.me@gmail.com> #
|
|
14
|
+
# Copyright 2024 Enrico Minack <github@enrico.minack.dev> #
|
|
15
|
+
# Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
|
|
16
|
+
# Copyright 2025 Enrico Minack <github@enrico.minack.dev> #
|
|
17
|
+
# Copyright 2026 Enrico Minack <github@enrico.minack.dev> #
|
|
18
|
+
# #
|
|
19
|
+
# This file is part of PyGithub. #
|
|
20
|
+
# http://pygithub.readthedocs.io/ #
|
|
21
|
+
# #
|
|
22
|
+
# PyGithub is free software: you can redistribute it and/or modify it under #
|
|
23
|
+
# the terms of the GNU Lesser General Public License as published by the Free #
|
|
24
|
+
# Software Foundation, either version 3 of the License, or (at your option) #
|
|
25
|
+
# any later version. #
|
|
26
|
+
# #
|
|
27
|
+
# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
|
|
28
|
+
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
|
|
29
|
+
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
|
|
30
|
+
# details. #
|
|
31
|
+
# #
|
|
32
|
+
# You should have received a copy of the GNU Lesser General Public License #
|
|
33
|
+
# along with PyGithub. If not, see <http://www.gnu.org/licenses/>. #
|
|
34
|
+
# #
|
|
35
|
+
################################################################################
|
|
36
|
+
|
|
37
|
+
from __future__ import annotations
|
|
38
|
+
|
|
39
|
+
from typing import Any
|
|
40
|
+
|
|
41
|
+
from githubasyncio import Consts
|
|
42
|
+
from githubasyncio.GithubObject import Attribute, CompletableGithubObject, NotSet
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class SourceImport(CompletableGithubObject):
|
|
46
|
+
"""
|
|
47
|
+
This class represents SourceImports.
|
|
48
|
+
|
|
49
|
+
The reference can be found here
|
|
50
|
+
https://docs.github.com/en/rest/reference/migrations#source-imports
|
|
51
|
+
|
|
52
|
+
The OpenAPI schema can be found at
|
|
53
|
+
|
|
54
|
+
- /components/schemas/import
|
|
55
|
+
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
def _initAttributes(self) -> None:
|
|
59
|
+
self._authors_count: Attribute[int] = NotSet
|
|
60
|
+
self._authors_url: Attribute[str] = NotSet
|
|
61
|
+
self._commit_count: Attribute[int] = NotSet
|
|
62
|
+
self._error_message: Attribute[str] = NotSet
|
|
63
|
+
self._failed_step: Attribute[str] = NotSet
|
|
64
|
+
self._has_large_files: Attribute[bool] = NotSet
|
|
65
|
+
self._html_url: Attribute[str] = NotSet
|
|
66
|
+
self._import_percent: Attribute[int] = NotSet
|
|
67
|
+
self._large_files_count: Attribute[int] = NotSet
|
|
68
|
+
self._large_files_size: Attribute[int] = NotSet
|
|
69
|
+
self._message: Attribute[str] = NotSet
|
|
70
|
+
self._project_choices: Attribute[list[dict[str, Any]]] = NotSet
|
|
71
|
+
self._push_percent: Attribute[int] = NotSet
|
|
72
|
+
self._repository_url: Attribute[str] = NotSet
|
|
73
|
+
self._status: Attribute[str] = NotSet
|
|
74
|
+
self._status_text: Attribute[str] = NotSet
|
|
75
|
+
self._svc_root: Attribute[str] = NotSet
|
|
76
|
+
self._svn_root: Attribute[str] = NotSet
|
|
77
|
+
self._tfvc_project: Attribute[str] = NotSet
|
|
78
|
+
self._url: Attribute[str] = NotSet
|
|
79
|
+
self._use_lfs: Attribute[str] = NotSet
|
|
80
|
+
self._vcs: Attribute[str] = NotSet
|
|
81
|
+
self._vcs_url: Attribute[str] = NotSet
|
|
82
|
+
|
|
83
|
+
def __repr__(self) -> str:
|
|
84
|
+
return self.get__repr__(
|
|
85
|
+
{
|
|
86
|
+
"vcs_url": self._vcs_url.value,
|
|
87
|
+
"repository_url": self._repository_url.value,
|
|
88
|
+
"status": self._status.value,
|
|
89
|
+
"url": self._url.value,
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
@property
|
|
94
|
+
async def authors_count(self) -> int:
|
|
95
|
+
await self._completeIfNotSet(self._authors_count)
|
|
96
|
+
return self._authors_count.value
|
|
97
|
+
|
|
98
|
+
@property
|
|
99
|
+
async def authors_url(self) -> str:
|
|
100
|
+
await self._completeIfNotSet(self._authors_url)
|
|
101
|
+
return self._authors_url.value
|
|
102
|
+
|
|
103
|
+
@property
|
|
104
|
+
async def commit_count(self) -> int:
|
|
105
|
+
await self._completeIfNotSet(self._commit_count)
|
|
106
|
+
return self._commit_count.value
|
|
107
|
+
|
|
108
|
+
@property
|
|
109
|
+
async def error_message(self) -> str:
|
|
110
|
+
await self._completeIfNotSet(self._error_message)
|
|
111
|
+
return self._error_message.value
|
|
112
|
+
|
|
113
|
+
@property
|
|
114
|
+
async def failed_step(self) -> str:
|
|
115
|
+
await self._completeIfNotSet(self._failed_step)
|
|
116
|
+
return self._failed_step.value
|
|
117
|
+
|
|
118
|
+
@property
|
|
119
|
+
async def has_large_files(self) -> bool:
|
|
120
|
+
await self._completeIfNotSet(self._has_large_files)
|
|
121
|
+
return self._has_large_files.value
|
|
122
|
+
|
|
123
|
+
@property
|
|
124
|
+
async def html_url(self) -> str:
|
|
125
|
+
await self._completeIfNotSet(self._html_url)
|
|
126
|
+
return self._html_url.value
|
|
127
|
+
|
|
128
|
+
@property
|
|
129
|
+
async def import_percent(self) -> int:
|
|
130
|
+
await self._completeIfNotSet(self._import_percent)
|
|
131
|
+
return self._import_percent.value
|
|
132
|
+
|
|
133
|
+
@property
|
|
134
|
+
async def large_files_count(self) -> int:
|
|
135
|
+
await self._completeIfNotSet(self._large_files_count)
|
|
136
|
+
return self._large_files_count.value
|
|
137
|
+
|
|
138
|
+
@property
|
|
139
|
+
async def large_files_size(self) -> int:
|
|
140
|
+
await self._completeIfNotSet(self._large_files_size)
|
|
141
|
+
return self._large_files_size.value
|
|
142
|
+
|
|
143
|
+
@property
|
|
144
|
+
async def message(self) -> str:
|
|
145
|
+
await self._completeIfNotSet(self._message)
|
|
146
|
+
return self._message.value
|
|
147
|
+
|
|
148
|
+
@property
|
|
149
|
+
async def project_choices(self) -> list[dict[str, Any]]:
|
|
150
|
+
await self._completeIfNotSet(self._project_choices)
|
|
151
|
+
return self._project_choices.value
|
|
152
|
+
|
|
153
|
+
@property
|
|
154
|
+
async def push_percent(self) -> int:
|
|
155
|
+
await self._completeIfNotSet(self._push_percent)
|
|
156
|
+
return self._push_percent.value
|
|
157
|
+
|
|
158
|
+
@property
|
|
159
|
+
async def repository_url(self) -> str:
|
|
160
|
+
await self._completeIfNotSet(self._repository_url)
|
|
161
|
+
return self._repository_url.value
|
|
162
|
+
|
|
163
|
+
@property
|
|
164
|
+
async def status(self) -> str:
|
|
165
|
+
await self._completeIfNotSet(self._status)
|
|
166
|
+
return self._status.value
|
|
167
|
+
|
|
168
|
+
@property
|
|
169
|
+
async def status_text(self) -> str:
|
|
170
|
+
await self._completeIfNotSet(self._status_text)
|
|
171
|
+
return self._status_text.value
|
|
172
|
+
|
|
173
|
+
@property
|
|
174
|
+
async def svc_root(self) -> str:
|
|
175
|
+
await self._completeIfNotSet(self._svc_root)
|
|
176
|
+
return self._svc_root.value
|
|
177
|
+
|
|
178
|
+
@property
|
|
179
|
+
async def svn_root(self) -> str:
|
|
180
|
+
await self._completeIfNotSet(self._svn_root)
|
|
181
|
+
return self._svn_root.value
|
|
182
|
+
|
|
183
|
+
@property
|
|
184
|
+
async def tfvc_project(self) -> str:
|
|
185
|
+
await self._completeIfNotSet(self._tfvc_project)
|
|
186
|
+
return self._tfvc_project.value
|
|
187
|
+
|
|
188
|
+
@property
|
|
189
|
+
async def url(self) -> str:
|
|
190
|
+
await self._completeIfNotSet(self._url)
|
|
191
|
+
return self._url.value
|
|
192
|
+
|
|
193
|
+
@property
|
|
194
|
+
async def use_lfs(self) -> str:
|
|
195
|
+
await self._completeIfNotSet(self._use_lfs)
|
|
196
|
+
return self._use_lfs.value
|
|
197
|
+
|
|
198
|
+
@property
|
|
199
|
+
async def vcs(self) -> str:
|
|
200
|
+
await self._completeIfNotSet(self._vcs)
|
|
201
|
+
return self._vcs.value
|
|
202
|
+
|
|
203
|
+
@property
|
|
204
|
+
async def vcs_url(self) -> str:
|
|
205
|
+
await self._completeIfNotSet(self._vcs_url)
|
|
206
|
+
return self._vcs_url.value
|
|
207
|
+
|
|
208
|
+
async def update(
|
|
209
|
+
self, additional_headers: dict[str, Any] | None = None, parameters: dict[str, Any] | None = None
|
|
210
|
+
) -> bool:
|
|
211
|
+
import_header = {"Accept": Consts.mediaTypeImportPreview}
|
|
212
|
+
return await super().update(additional_headers=import_header, parameters=parameters)
|
|
213
|
+
|
|
214
|
+
def _useAttributes(self, attributes: dict[str, Any]) -> None:
|
|
215
|
+
if "authors_count" in attributes: # pragma no branch
|
|
216
|
+
self._authors_count = self._makeIntAttribute(attributes["authors_count"])
|
|
217
|
+
if "authors_url" in attributes: # pragma no branch
|
|
218
|
+
self._authors_url = self._makeStringAttribute(attributes["authors_url"])
|
|
219
|
+
if "commit_count" in attributes: # pragma no branch
|
|
220
|
+
self._commit_count = self._makeIntAttribute(attributes["commit_count"])
|
|
221
|
+
if "error_message" in attributes: # pragma no branch
|
|
222
|
+
self._error_message = self._makeStringAttribute(attributes["error_message"])
|
|
223
|
+
if "failed_step" in attributes: # pragma no branch
|
|
224
|
+
self._failed_step = self._makeStringAttribute(attributes["failed_step"])
|
|
225
|
+
if "has_large_files" in attributes: # pragma no branch
|
|
226
|
+
self._has_large_files = self._makeBoolAttribute(attributes["has_large_files"])
|
|
227
|
+
if "html_url" in attributes: # pragma no branch
|
|
228
|
+
self._html_url = self._makeStringAttribute(attributes["html_url"])
|
|
229
|
+
if "import_percent" in attributes: # pragma no branch
|
|
230
|
+
self._import_percent = self._makeIntAttribute(attributes["import_percent"])
|
|
231
|
+
if "large_files_count" in attributes: # pragma no branch
|
|
232
|
+
self._large_files_count = self._makeIntAttribute(attributes["large_files_count"])
|
|
233
|
+
if "large_files_size" in attributes: # pragma no branch
|
|
234
|
+
self._large_files_size = self._makeIntAttribute(attributes["large_files_size"])
|
|
235
|
+
if "message" in attributes: # pragma no branch
|
|
236
|
+
self._message = self._makeStringAttribute(attributes["message"])
|
|
237
|
+
if "project_choices" in attributes: # pragma no branch
|
|
238
|
+
self._project_choices = self._makeListOfDictsAttribute(attributes["project_choices"])
|
|
239
|
+
if "push_percent" in attributes: # pragma no branch
|
|
240
|
+
self._push_percent = self._makeIntAttribute(attributes["push_percent"])
|
|
241
|
+
if "repository_url" in attributes: # pragma no branch
|
|
242
|
+
self._repository_url = self._makeStringAttribute(attributes["repository_url"])
|
|
243
|
+
if "status" in attributes: # pragma no branch
|
|
244
|
+
self._status = self._makeStringAttribute(attributes["status"])
|
|
245
|
+
if "status_text" in attributes: # pragma no branch
|
|
246
|
+
self._status_text = self._makeStringAttribute(attributes["status_text"])
|
|
247
|
+
if "svc_root" in attributes: # pragma no branch
|
|
248
|
+
self._svc_root = self._makeStringAttribute(attributes["svc_root"])
|
|
249
|
+
if "svn_root" in attributes: # pragma no branch
|
|
250
|
+
self._svn_root = self._makeStringAttribute(attributes["svn_root"])
|
|
251
|
+
if "tfvc_project" in attributes: # pragma no branch
|
|
252
|
+
self._tfvc_project = self._makeStringAttribute(attributes["tfvc_project"])
|
|
253
|
+
if "url" in attributes: # pragma no branch
|
|
254
|
+
self._url = self._makeStringAttribute(attributes["url"])
|
|
255
|
+
if "use_lfs" in attributes: # pragma no branch
|
|
256
|
+
self._use_lfs = self._makeStringAttribute(attributes["use_lfs"])
|
|
257
|
+
if "vcs" in attributes: # pragma no branch
|
|
258
|
+
self._vcs = self._makeStringAttribute(attributes["vcs"])
|
|
259
|
+
if "vcs_url" in attributes: # pragma no branch
|
|
260
|
+
self._vcs_url = self._makeStringAttribute(attributes["vcs_url"])
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# FILE AUTO GENERATED DO NOT TOUCH
|
|
2
|
+
############################ Copyrights and license ############################
|
|
3
|
+
# #
|
|
4
|
+
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
|
|
5
|
+
# Copyright 2012 Zearin <zearin@gonk.net> #
|
|
6
|
+
# Copyright 2013 AKFish <akfish@gmail.com> #
|
|
7
|
+
# Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> #
|
|
8
|
+
# Copyright 2013 martinqt <m.ki2@laposte.net> #
|
|
9
|
+
# Copyright 2014 Vincent Jacques <vincent@vincent-jacques.net> #
|
|
10
|
+
# Copyright 2015 Dan Vanderkam <danvdk@gmail.com> #
|
|
11
|
+
# Copyright 2016 Jannis Gebauer <ja.geb@me.com> #
|
|
12
|
+
# Copyright 2016 Peter Buckley <dx-pbuckley@users.noreply.github.com> #
|
|
13
|
+
# Copyright 2018 Wan Liuyang <tsfdye@gmail.com> #
|
|
14
|
+
# Copyright 2018 sfdye <tsfdye@gmail.com> #
|
|
15
|
+
# Copyright 2019 Steve Kowalik <steven@wedontsleep.org> #
|
|
16
|
+
# Copyright 2019 Wan Liuyang <tsfdye@gmail.com> #
|
|
17
|
+
# Copyright 2020 Steve Kowalik <steven@wedontsleep.org> #
|
|
18
|
+
# Copyright 2021 Mark Walker <mark.walker@realbuzz.com> #
|
|
19
|
+
# Copyright 2021 Steve Kowalik <steven@wedontsleep.org> #
|
|
20
|
+
# Copyright 2023 Enrico Minack <github@enrico.minack.dev> #
|
|
21
|
+
# Copyright 2023 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
|
|
22
|
+
# Copyright 2023 Trim21 <trim21.me@gmail.com> #
|
|
23
|
+
# Copyright 2024 Enrico Minack <github@enrico.minack.dev> #
|
|
24
|
+
# Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
|
|
25
|
+
# Copyright 2025 Enrico Minack <github@enrico.minack.dev> #
|
|
26
|
+
# #
|
|
27
|
+
# This file is part of PyGithub. #
|
|
28
|
+
# http://pygithub.readthedocs.io/ #
|
|
29
|
+
# #
|
|
30
|
+
# PyGithub is free software: you can redistribute it and/or modify it under #
|
|
31
|
+
# the terms of the GNU Lesser General Public License as published by the Free #
|
|
32
|
+
# Software Foundation, either version 3 of the License, or (at your option) #
|
|
33
|
+
# any later version. #
|
|
34
|
+
# #
|
|
35
|
+
# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
|
|
36
|
+
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
|
|
37
|
+
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
|
|
38
|
+
# details. #
|
|
39
|
+
# #
|
|
40
|
+
# You should have received a copy of the GNU Lesser General Public License #
|
|
41
|
+
# along with PyGithub. If not, see <http://www.gnu.org/licenses/>. #
|
|
42
|
+
# #
|
|
43
|
+
################################################################################
|
|
44
|
+
|
|
45
|
+
from __future__ import annotations
|
|
46
|
+
|
|
47
|
+
from datetime import datetime
|
|
48
|
+
from typing import TYPE_CHECKING, Any
|
|
49
|
+
|
|
50
|
+
import githubasyncio.NamedUser
|
|
51
|
+
from githubasyncio.GithubObject import Attribute, NonCompletableGithubObject, NotSet
|
|
52
|
+
|
|
53
|
+
if TYPE_CHECKING:
|
|
54
|
+
from githubasyncio.NamedUser import NamedUser
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class Stargazer(NonCompletableGithubObject):
|
|
58
|
+
"""
|
|
59
|
+
This class represents Stargazers.
|
|
60
|
+
|
|
61
|
+
The reference can be found here
|
|
62
|
+
https://docs.github.com/en/rest/reference/activity#starring
|
|
63
|
+
|
|
64
|
+
"""
|
|
65
|
+
|
|
66
|
+
def _initAttributes(self) -> None:
|
|
67
|
+
self._starred_at: Attribute[datetime] = NotSet
|
|
68
|
+
self._url: Attribute[str] = NotSet
|
|
69
|
+
self._user: Attribute[NamedUser] = NotSet
|
|
70
|
+
|
|
71
|
+
def __repr__(self) -> str:
|
|
72
|
+
# this is not a type error, just we didn't type `NamedUser` yet.
|
|
73
|
+
# enable type checker here after we typed attribute of `NamedUser`
|
|
74
|
+
return self.get__repr__({"user": self._user.value._login.value}) # type: ignore
|
|
75
|
+
|
|
76
|
+
@property
|
|
77
|
+
def starred_at(self) -> datetime:
|
|
78
|
+
return self._starred_at.value
|
|
79
|
+
|
|
80
|
+
@property
|
|
81
|
+
def user(self) -> NamedUser:
|
|
82
|
+
return self._user.value
|
|
83
|
+
|
|
84
|
+
def _useAttributes(self, attributes: dict[str, Any]) -> None:
|
|
85
|
+
if "starred_at" in attributes:
|
|
86
|
+
self._starred_at = self._makeDatetimeAttribute(attributes["starred_at"])
|
|
87
|
+
if "user" in attributes:
|
|
88
|
+
self._user = self._makeClassAttribute(githubasyncio.NamedUser.NamedUser, attributes["user"])
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# FILE AUTO GENERATED DO NOT TOUCH
|
|
2
|
+
############################ Copyrights and license ############################
|
|
3
|
+
# #
|
|
4
|
+
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
|
|
5
|
+
# Copyright 2012 Zearin <zearin@gonk.net> #
|
|
6
|
+
# Copyright 2013 AKFish <akfish@gmail.com> #
|
|
7
|
+
# Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> #
|
|
8
|
+
# Copyright 2014 Vincent Jacques <vincent@vincent-jacques.net> #
|
|
9
|
+
# Copyright 2016 Peter Buckley <dx-pbuckley@users.noreply.github.com> #
|
|
10
|
+
# Copyright 2018 Wan Liuyang <tsfdye@gmail.com> #
|
|
11
|
+
# Copyright 2018 sfdye <tsfdye@gmail.com> #
|
|
12
|
+
# Copyright 2019 Steve Kowalik <steven@wedontsleep.org> #
|
|
13
|
+
# Copyright 2019 Wan Liuyang <tsfdye@gmail.com> #
|
|
14
|
+
# Copyright 2020 Steve Kowalik <steven@wedontsleep.org> #
|
|
15
|
+
# Copyright 2021 Mark Walker <mark.walker@realbuzz.com> #
|
|
16
|
+
# Copyright 2021 Steve Kowalik <steven@wedontsleep.org> #
|
|
17
|
+
# Copyright 2023 Enrico Minack <github@enrico.minack.dev> #
|
|
18
|
+
# Copyright 2023 Trim21 <trim21.me@gmail.com> #
|
|
19
|
+
# Copyright 2024 Enrico Minack <github@enrico.minack.dev> #
|
|
20
|
+
# Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
|
|
21
|
+
# Copyright 2025 Enrico Minack <github@enrico.minack.dev> #
|
|
22
|
+
# #
|
|
23
|
+
# This file is part of PyGithub. #
|
|
24
|
+
# http://pygithub.readthedocs.io/ #
|
|
25
|
+
# #
|
|
26
|
+
# PyGithub is free software: you can redistribute it and/or modify it under #
|
|
27
|
+
# the terms of the GNU Lesser General Public License as published by the Free #
|
|
28
|
+
# Software Foundation, either version 3 of the License, or (at your option) #
|
|
29
|
+
# any later version. #
|
|
30
|
+
# #
|
|
31
|
+
# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
|
|
32
|
+
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
|
|
33
|
+
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
|
|
34
|
+
# details. #
|
|
35
|
+
# #
|
|
36
|
+
# You should have received a copy of the GNU Lesser General Public License #
|
|
37
|
+
# along with PyGithub. If not, see <http://www.gnu.org/licenses/>. #
|
|
38
|
+
# #
|
|
39
|
+
################################################################################
|
|
40
|
+
|
|
41
|
+
from __future__ import annotations
|
|
42
|
+
|
|
43
|
+
from datetime import datetime
|
|
44
|
+
|
|
45
|
+
from githubasyncio.GithubObject import Attribute, NonCompletableGithubObject, NotSet
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class StatsCodeFrequency(NonCompletableGithubObject):
|
|
49
|
+
"""
|
|
50
|
+
This class represents statistics of StatsCodeFrequencies.
|
|
51
|
+
|
|
52
|
+
The reference can be found here
|
|
53
|
+
https://docs.github.com/en/rest/metrics/statistics?apiVersion=2022-11-28#get-the-weekly-commit-activity
|
|
54
|
+
|
|
55
|
+
The OpenAPI schema can be found at
|
|
56
|
+
|
|
57
|
+
- /components/schemas/code-frequency-stat
|
|
58
|
+
|
|
59
|
+
"""
|
|
60
|
+
|
|
61
|
+
def _initAttributes(self) -> None:
|
|
62
|
+
self._additions: Attribute[int] = NotSet
|
|
63
|
+
self._deletions: Attribute[int] = NotSet
|
|
64
|
+
self._week: Attribute[datetime] = NotSet
|
|
65
|
+
|
|
66
|
+
@property
|
|
67
|
+
def additions(self) -> int:
|
|
68
|
+
return self._additions.value
|
|
69
|
+
|
|
70
|
+
@property
|
|
71
|
+
def deletions(self) -> int:
|
|
72
|
+
return self._deletions.value
|
|
73
|
+
|
|
74
|
+
@property
|
|
75
|
+
def week(self) -> datetime:
|
|
76
|
+
return self._week.value
|
|
77
|
+
|
|
78
|
+
def _useAttributes(self, attributes: tuple[int, int, int]) -> None:
|
|
79
|
+
self._week = self._makeTimestampAttribute(attributes[0])
|
|
80
|
+
self._additions = self._makeIntAttribute(attributes[1])
|
|
81
|
+
self._deletions = self._makeIntAttribute(attributes[2])
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# FILE AUTO GENERATED DO NOT TOUCH
|
|
2
|
+
############################ Copyrights and license ############################
|
|
3
|
+
# #
|
|
4
|
+
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
|
|
5
|
+
# Copyright 2012 Zearin <zearin@gonk.net> #
|
|
6
|
+
# Copyright 2013 AKFish <akfish@gmail.com> #
|
|
7
|
+
# Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> #
|
|
8
|
+
# Copyright 2014 Vincent Jacques <vincent@vincent-jacques.net> #
|
|
9
|
+
# Copyright 2016 Peter Buckley <dx-pbuckley@users.noreply.github.com> #
|
|
10
|
+
# Copyright 2018 Wan Liuyang <tsfdye@gmail.com> #
|
|
11
|
+
# Copyright 2018 sfdye <tsfdye@gmail.com> #
|
|
12
|
+
# Copyright 2019 Steve Kowalik <steven@wedontsleep.org> #
|
|
13
|
+
# Copyright 2019 Wan Liuyang <tsfdye@gmail.com> #
|
|
14
|
+
# Copyright 2020 Steve Kowalik <steven@wedontsleep.org> #
|
|
15
|
+
# Copyright 2021 Mark Walker <mark.walker@realbuzz.com> #
|
|
16
|
+
# Copyright 2021 Steve Kowalik <steven@wedontsleep.org> #
|
|
17
|
+
# Copyright 2023 Enrico Minack <github@enrico.minack.dev> #
|
|
18
|
+
# Copyright 2023 Trim21 <trim21.me@gmail.com> #
|
|
19
|
+
# Copyright 2024 Enrico Minack <github@enrico.minack.dev> #
|
|
20
|
+
# Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
|
|
21
|
+
# Copyright 2025 Enrico Minack <github@enrico.minack.dev> #
|
|
22
|
+
# #
|
|
23
|
+
# This file is part of PyGithub. #
|
|
24
|
+
# http://pygithub.readthedocs.io/ #
|
|
25
|
+
# #
|
|
26
|
+
# PyGithub is free software: you can redistribute it and/or modify it under #
|
|
27
|
+
# the terms of the GNU Lesser General Public License as published by the Free #
|
|
28
|
+
# Software Foundation, either version 3 of the License, or (at your option) #
|
|
29
|
+
# any later version. #
|
|
30
|
+
# #
|
|
31
|
+
# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
|
|
32
|
+
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
|
|
33
|
+
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
|
|
34
|
+
# details. #
|
|
35
|
+
# #
|
|
36
|
+
# You should have received a copy of the GNU Lesser General Public License #
|
|
37
|
+
# along with PyGithub. If not, see <http://www.gnu.org/licenses/>. #
|
|
38
|
+
# #
|
|
39
|
+
################################################################################
|
|
40
|
+
|
|
41
|
+
from __future__ import annotations
|
|
42
|
+
|
|
43
|
+
from datetime import datetime
|
|
44
|
+
from typing import Any
|
|
45
|
+
|
|
46
|
+
import githubasyncio.GithubObject
|
|
47
|
+
from githubasyncio.GithubObject import Attribute
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class StatsCommitActivity(githubasyncio.GithubObject.NonCompletableGithubObject):
|
|
51
|
+
"""
|
|
52
|
+
This class represents StatsCommitActivities.
|
|
53
|
+
|
|
54
|
+
The reference can be found here
|
|
55
|
+
https://docs.github.com/en/rest/reference/repos#get-the-last-year-of-commit-activity
|
|
56
|
+
|
|
57
|
+
The OpenAPI schema can be found at
|
|
58
|
+
|
|
59
|
+
- /components/schemas/commit-activity
|
|
60
|
+
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
def _initAttributes(self) -> None:
|
|
64
|
+
self._days: Attribute[int] = githubasyncio.GithubObject.NotSet
|
|
65
|
+
self._total: Attribute[int] = githubasyncio.GithubObject.NotSet
|
|
66
|
+
self._week: Attribute[datetime] = githubasyncio.GithubObject.NotSet
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def days(self) -> int:
|
|
70
|
+
return self._days.value
|
|
71
|
+
|
|
72
|
+
@property
|
|
73
|
+
def total(self) -> int:
|
|
74
|
+
return self._total.value
|
|
75
|
+
|
|
76
|
+
@property
|
|
77
|
+
def week(self) -> datetime:
|
|
78
|
+
return self._week.value
|
|
79
|
+
|
|
80
|
+
def _useAttributes(self, attributes: dict[str, Any]) -> None:
|
|
81
|
+
if "days" in attributes: # pragma no branch
|
|
82
|
+
self._days = self._makeListOfIntsAttribute(attributes["days"])
|
|
83
|
+
if "total" in attributes: # pragma no branch
|
|
84
|
+
self._total = self._makeIntAttribute(attributes["total"])
|
|
85
|
+
if "week" in attributes: # pragma no branch
|
|
86
|
+
self._week = self._makeTimestampAttribute(attributes["week"])
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# FILE AUTO GENERATED DO NOT TOUCH
|
|
2
|
+
############################ Copyrights and license ############################
|
|
3
|
+
# #
|
|
4
|
+
# Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> #
|
|
5
|
+
# Copyright 2014 Vincent Jacques <vincent@vincent-jacques.net> #
|
|
6
|
+
# Copyright 2016 Peter Buckley <dx-pbuckley@users.noreply.github.com> #
|
|
7
|
+
# Copyright 2018 Wan Liuyang <tsfdye@gmail.com> #
|
|
8
|
+
# Copyright 2018 sfdye <tsfdye@gmail.com> #
|
|
9
|
+
# Copyright 2019 Steve Kowalik <steven@wedontsleep.org> #
|
|
10
|
+
# Copyright 2019 Wan Liuyang <tsfdye@gmail.com> #
|
|
11
|
+
# Copyright 2020 Steve Kowalik <steven@wedontsleep.org> #
|
|
12
|
+
# Copyright 2021 Mark Walker <mark.walker@realbuzz.com> #
|
|
13
|
+
# Copyright 2021 Steve Kowalik <steven@wedontsleep.org> #
|
|
14
|
+
# Copyright 2023 Enrico Minack <github@enrico.minack.dev> #
|
|
15
|
+
# Copyright 2023 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
|
|
16
|
+
# Copyright 2023 Trim21 <trim21.me@gmail.com> #
|
|
17
|
+
# Copyright 2024 Enrico Minack <github@enrico.minack.dev> #
|
|
18
|
+
# Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
|
|
19
|
+
# Copyright 2025 Enrico Minack <github@enrico.minack.dev> #
|
|
20
|
+
# #
|
|
21
|
+
# This file is part of PyGithub. #
|
|
22
|
+
# http://pygithub.readthedocs.io/ #
|
|
23
|
+
# #
|
|
24
|
+
# PyGithub is free software: you can redistribute it and/or modify it under #
|
|
25
|
+
# the terms of the GNU Lesser General Public License as published by the Free #
|
|
26
|
+
# Software Foundation, either version 3 of the License, or (at your option) #
|
|
27
|
+
# any later version. #
|
|
28
|
+
# #
|
|
29
|
+
# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
|
|
30
|
+
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
|
|
31
|
+
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
|
|
32
|
+
# details. #
|
|
33
|
+
# #
|
|
34
|
+
# You should have received a copy of the GNU Lesser General Public License #
|
|
35
|
+
# along with PyGithub. If not, see <http://www.gnu.org/licenses/>. #
|
|
36
|
+
# #
|
|
37
|
+
################################################################################
|
|
38
|
+
|
|
39
|
+
from __future__ import annotations
|
|
40
|
+
|
|
41
|
+
from datetime import datetime
|
|
42
|
+
from typing import TYPE_CHECKING, Any
|
|
43
|
+
|
|
44
|
+
import githubasyncio.GithubObject
|
|
45
|
+
import githubasyncio.NamedUser
|
|
46
|
+
import githubasyncio.Organization
|
|
47
|
+
from githubasyncio.GithubObject import Attribute, NonCompletableGithubObject, NotSet
|
|
48
|
+
|
|
49
|
+
if TYPE_CHECKING:
|
|
50
|
+
from githubasyncio.NamedUser import NamedUser
|
|
51
|
+
from githubasyncio.Organization import Organization
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class StatsContributor(NonCompletableGithubObject):
|
|
55
|
+
"""
|
|
56
|
+
This class represents StatsContributors.
|
|
57
|
+
|
|
58
|
+
The reference can be found here
|
|
59
|
+
https://docs.github.com/en/rest/reference/repos#get-all-contributor-commit-activity
|
|
60
|
+
|
|
61
|
+
The OpenAPI schema can be found at
|
|
62
|
+
|
|
63
|
+
- /components/schemas/contributor-activity
|
|
64
|
+
|
|
65
|
+
"""
|
|
66
|
+
|
|
67
|
+
class Week(NonCompletableGithubObject):
|
|
68
|
+
"""
|
|
69
|
+
This class represents weekly statistics of a contributor.
|
|
70
|
+
|
|
71
|
+
The OpenAPI schema can be found at
|
|
72
|
+
|
|
73
|
+
- /components/schemas/contributor-activity/properties/weeks/items
|
|
74
|
+
|
|
75
|
+
"""
|
|
76
|
+
|
|
77
|
+
def _initAttributes(self) -> None:
|
|
78
|
+
self._a: Attribute[int] = NotSet
|
|
79
|
+
self._c: Attribute[int] = NotSet
|
|
80
|
+
self._d: Attribute[int] = NotSet
|
|
81
|
+
self._w: Attribute[datetime] = NotSet
|
|
82
|
+
|
|
83
|
+
@property
|
|
84
|
+
def a(self) -> int:
|
|
85
|
+
return self._a.value
|
|
86
|
+
|
|
87
|
+
@property
|
|
88
|
+
def c(self) -> int:
|
|
89
|
+
return self._c.value
|
|
90
|
+
|
|
91
|
+
@property
|
|
92
|
+
def d(self) -> int:
|
|
93
|
+
return self._d.value
|
|
94
|
+
|
|
95
|
+
@property
|
|
96
|
+
def w(self) -> datetime:
|
|
97
|
+
return self._w.value
|
|
98
|
+
|
|
99
|
+
def _useAttributes(self, attributes: dict[str, Any]) -> None:
|
|
100
|
+
if "a" in attributes: # pragma no branch
|
|
101
|
+
self._a = self._makeIntAttribute(attributes["a"])
|
|
102
|
+
if "c" in attributes: # pragma no branch
|
|
103
|
+
self._c = self._makeIntAttribute(attributes["c"])
|
|
104
|
+
if "d" in attributes: # pragma no branch
|
|
105
|
+
self._d = self._makeIntAttribute(attributes["d"])
|
|
106
|
+
if "w" in attributes: # pragma no branch
|
|
107
|
+
self._w = self._makeTimestampAttribute(attributes["w"])
|
|
108
|
+
|
|
109
|
+
def _initAttributes(self) -> None:
|
|
110
|
+
self._author: Attribute[NamedUser | Organization] = NotSet
|
|
111
|
+
self._total: Attribute[int] = NotSet
|
|
112
|
+
self._weeks: Attribute[list[StatsContributor.Week]] = NotSet
|
|
113
|
+
|
|
114
|
+
@property
|
|
115
|
+
def author(self) -> NamedUser | Organization:
|
|
116
|
+
return self._author.value
|
|
117
|
+
|
|
118
|
+
@property
|
|
119
|
+
def total(self) -> int:
|
|
120
|
+
return self._total.value
|
|
121
|
+
|
|
122
|
+
@property
|
|
123
|
+
def weeks(self) -> list[Week]:
|
|
124
|
+
return self._weeks.value
|
|
125
|
+
|
|
126
|
+
def _useAttributes(self, attributes: dict[str, Any]) -> None:
|
|
127
|
+
if "author" in attributes: # pragma no branch
|
|
128
|
+
self._author = self._makeUnionClassAttributeFromTypeKey(
|
|
129
|
+
"type",
|
|
130
|
+
"User",
|
|
131
|
+
attributes["author"],
|
|
132
|
+
(githubasyncio.NamedUser.NamedUser, "User"),
|
|
133
|
+
(githubasyncio.Organization.Organization, "Organization"),
|
|
134
|
+
)
|
|
135
|
+
if "total" in attributes: # pragma no branch
|
|
136
|
+
self._total = self._makeIntAttribute(attributes["total"])
|
|
137
|
+
if "weeks" in attributes: # pragma no branch
|
|
138
|
+
self._weeks = self._makeListOfClassesAttribute(self.Week, attributes["weeks"])
|