mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 11:21:16 +00:00
Spliting GithubObjects.py
This commit is contained in:
+1
-11
@@ -34,21 +34,11 @@ from Branch import Branch
|
||||
from PullRequestFile import PullRequestFile
|
||||
from PullRequestComment import PullRequestComment
|
||||
from PullRequest import PullRequest
|
||||
from RepositoryKey import RepositoryKey
|
||||
|
||||
__modifyAttributesForObjectsReferingReferedRepo = { "_repo": lambda obj: obj._repo }
|
||||
__modifyAttributesForObjectsReferingRepo = { "_repo": lambda repo: repo }
|
||||
|
||||
RepositoryKey = GithubObject(
|
||||
"RepositoryKey",
|
||||
BaseUrl( lambda obj: obj._repo._baseUrl() + "/keys/" + str( obj.id ) ),
|
||||
InternalSimpleAttributes(
|
||||
"url", "id", "title", "key",
|
||||
"_repo",
|
||||
),
|
||||
Editable( [ "title", "key" ], [] ),
|
||||
Deletable()
|
||||
)
|
||||
|
||||
Repository = GithubObject(
|
||||
"Repository",
|
||||
BaseUrl( lambda obj: "/repos/" + obj.owner.login + "/" + obj.name ),
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
from GithubObject import *
|
||||
|
||||
RepositoryKey = GithubObject(
|
||||
"RepositoryKey",
|
||||
BaseUrl( lambda obj: obj._repo._baseUrl() + "/keys/" + str( obj.id ) ),
|
||||
InternalSimpleAttributes(
|
||||
"url", "id", "title", "key",
|
||||
"_repo",
|
||||
),
|
||||
Editable( [ "title", "key" ], [] ),
|
||||
Deletable()
|
||||
)
|
||||
Reference in New Issue
Block a user