Remove repeated code

This commit is contained in:
Vincent Jacques
2012-05-12 15:00:23 +02:00
parent 71b0ede8de
commit 350c7a3726
39 changed files with 42 additions and 190 deletions
+1 -5
View File
@@ -1,14 +1,10 @@
import PaginatedList
from GithubObject import *
{% for dependency in class.dependencies %}
import {{ dependency }}
{% endfor %}
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
class {{ class.name }}( object ):
def __init__( self, requester, attributes, lazy ):
self.__requester = requester
+1 -5
View File
@@ -2,6 +2,7 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
from GithubObject import *
import Gist
import Repository
import NamedUser
@@ -11,11 +12,6 @@ import UserKey
import Issue
import Event
import Authorization
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
class AuthenticatedUser( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,11 +2,7 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
from GithubObject import *
class Authorization( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,12 +2,8 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
from GithubObject import *
import Commit
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
class Branch( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,17 +2,13 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
from GithubObject import *
import CommitFile
import NamedUser
import GitCommit
import CommitStats
import Commit
import CommitComment
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
class Commit( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,12 +2,8 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
from GithubObject import *
import NamedUser
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
class CommitComment( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,11 +2,7 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
from GithubObject import *
class CommitFile( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,11 +2,7 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
from GithubObject import *
class CommitStats( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,11 +2,7 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
from GithubObject import *
class Download( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,14 +2,10 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
from GithubObject import *
import Organization
import Repository
import NamedUser
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
class Event( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,14 +2,10 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
from GithubObject import *
import NamedUser
import Gist
import GistComment
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
class Gist( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,12 +2,8 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
from GithubObject import *
import NamedUser
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
class GistComment( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,11 +2,7 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
from GithubObject import *
class GitAuthor( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,11 +2,7 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
from GithubObject import *
class GitBlob( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,14 +2,10 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
from GithubObject import *
import GitAuthor
import GitCommit
import GitTree
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
class GitCommit( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,11 +2,7 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
from GithubObject import *
class GitObject( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,12 +2,8 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
from GithubObject import *
import GitObject
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
class GitRef( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,13 +2,9 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
from GithubObject import *
import GitAuthor
import GitObject
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
class GitTag( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,12 +2,8 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
from GithubObject import *
import GitTreeElement
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
class GitTree( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,11 +2,7 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
from GithubObject import *
class GitTreeElement( object ):
def __init__( self, requester, attributes, lazy ):
+4
View File
@@ -0,0 +1,4 @@
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
+1 -5
View File
@@ -2,11 +2,7 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
from GithubObject import *
class Hook( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,16 +2,12 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
from GithubObject import *
import IssueComment
import IssueEvent
import NamedUser
import Milestone
import Label
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
class Issue( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,12 +2,8 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
from GithubObject import *
import NamedUser
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
class IssueComment( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,12 +2,8 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
from GithubObject import *
import NamedUser
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
class IssueEvent( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,11 +2,7 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
from GithubObject import *
class Label( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,13 +2,9 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
from GithubObject import *
import NamedUser
import Label
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
class Milestone( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,16 +2,12 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
from GithubObject import *
import Organization
import Gist
import Event
import Repository
import NamedUser
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
class NamedUser( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,16 +2,12 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
from GithubObject import *
import Team
import Plan
import Event
import Repository
import NamedUser
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
class Organization( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,11 +2,7 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
from GithubObject import *
class Permissions( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,11 +2,7 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
from GithubObject import *
class Plan( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,15 +2,11 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
from GithubObject import *
import Commit
import NamedUser
import PullRequestComment
import PullRequestFile
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
class PullRequest( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,12 +2,8 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
from GithubObject import *
import NamedUser
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
class PullRequestComment( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,11 +2,7 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
from GithubObject import *
class PullRequestFile( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,6 +2,7 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
from GithubObject import *
import Branch
import IssueEvent
import Label
@@ -25,11 +26,6 @@ import Tag
import GitTag
import Download
import Event
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
class Repository( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,11 +2,7 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
from GithubObject import *
class RepositoryKey( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,12 +2,8 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
from GithubObject import *
import Commit
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
class Tag( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,13 +2,9 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
from GithubObject import *
import Repository
import NamedUser
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
class Team( object ):
def __init__( self, requester, attributes, lazy ):
+1 -5
View File
@@ -2,11 +2,7 @@
# Do not modify it manually, your work would be lost.
import PaginatedList
# This allows None as a valid value for an optional parameter
class DefaultValueForOptionalParametersType:
pass
DefaultValueForOptionalParameters = DefaultValueForOptionalParametersType()
from GithubObject import *
class UserKey( object ):
def __init__( self, requester, attributes, lazy ):