From cab9d71603e127bdd1f600a759dccea1781fa1ab Mon Sep 17 00:00:00 2001 From: Vincent Jacques Date: Tue, 13 Mar 2012 19:42:20 +0100 Subject: [PATCH] Spliting GithubObjects.py --- github/GithubObjects.py | 13 +------------ github/Label.py | 13 +++++++++++++ 2 files changed, 14 insertions(+), 12 deletions(-) create mode 100644 github/Label.py diff --git a/github/GithubObjects.py b/github/GithubObjects.py index 5dafd5d8..117d2200 100644 --- a/github/GithubObjects.py +++ b/github/GithubObjects.py @@ -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 } diff --git a/github/Label.py b/github/Label.py new file mode 100644 index 00000000..3c258a2c --- /dev/null +++ b/github/Label.py @@ -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(), +)