Spliting GithubObjects.py

This commit is contained in:
Vincent Jacques
2012-03-13 19:42:20 +01:00
parent e648e5aeb5
commit cab9d71603
2 changed files with 14 additions and 12 deletions
+1 -12
View File
@@ -21,18 +21,7 @@ from GitTree import GitTree
from GitCommit import GitCommit
from GitBlob import GitBlob
from GitTag import GitTag
Label = GithubObject(
"Label",
BaseUrl( lambda obj: obj._repo._baseUrl() + "/labels/" + obj._identity ),
Identity( lambda obj: urllib.quote( obj.name ) ),
InternalSimpleAttributes(
"url", "name", "color",
"_repo",
),
Editable( [ "name", "color" ], [] ),
Deletable(),
)
from Label import Label
__modifyAttributesForObjectsReferingReferedRepo = { "_repo": lambda obj: obj._repo }
+13
View File
@@ -0,0 +1,13 @@
from GithubObject import *
Label = GithubObject(
"Label",
BaseUrl( lambda obj: obj._repo._baseUrl() + "/labels/" + obj._identity ),
Identity( lambda obj: urllib.quote( obj.name ) ),
InternalSimpleAttributes(
"url", "name", "color",
"_repo",
),
Editable( [ "name", "color" ], [] ),
Deletable(),
)