This commit is contained in:
Vincent Jacques
2012-12-25 15:56:15 +01:00
parent 2558a8f2dd
commit 06269e557e
50 changed files with 107 additions and 113 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
AuthenticatedUser
==========================================================
=================
.. autoclass:: github.AuthenticatedUser.AuthenticatedUser
.. autoclass:: github.AuthenticatedUser.AuthenticatedUser()
+2 -2
View File
@@ -1,4 +1,4 @@
Authorization
==========================================================
=============
.. autoclass:: github.Authorization.Authorization
.. autoclass:: github.Authorization.Authorization()
@@ -1,4 +1,4 @@
AuthorizationApplication
==========================================================
========================
.. autoclass:: github.AuthorizationApplication.AuthorizationApplication
.. autoclass:: github.AuthorizationApplication.AuthorizationApplication()
+2 -2
View File
@@ -1,4 +1,4 @@
Branch
==========================================================
======
.. autoclass:: github.Branch.Branch
.. autoclass:: github.Branch.Branch()
+2 -2
View File
@@ -1,4 +1,4 @@
Commit
==========================================================
======
.. autoclass:: github.Commit.Commit
.. autoclass:: github.Commit.Commit()
+2 -2
View File
@@ -1,4 +1,4 @@
CommitComment
==========================================================
=============
.. autoclass:: github.CommitComment.CommitComment
.. autoclass:: github.CommitComment.CommitComment()
+2 -2
View File
@@ -1,4 +1,4 @@
CommitStats
==========================================================
===========
.. autoclass:: github.CommitStats.CommitStats
.. autoclass:: github.CommitStats.CommitStats()
+2 -2
View File
@@ -1,4 +1,4 @@
CommitStatus
==========================================================
============
.. autoclass:: github.CommitStatus.CommitStatus
.. autoclass:: github.CommitStatus.CommitStatus()
+2 -2
View File
@@ -1,4 +1,4 @@
Comparison
==========================================================
==========
.. autoclass:: github.Comparison.Comparison
.. autoclass:: github.Comparison.Comparison()
+2 -2
View File
@@ -1,4 +1,4 @@
ContentFile
==========================================================
===========
.. autoclass:: github.ContentFile.ContentFile
.. autoclass:: github.ContentFile.ContentFile()
+2 -2
View File
@@ -1,4 +1,4 @@
Download
==========================================================
========
.. autoclass:: github.Download.Download
.. autoclass:: github.Download.Download()
+2 -2
View File
@@ -1,4 +1,4 @@
Event
==========================================================
=====
.. autoclass:: github.Event.Event
.. autoclass:: github.Event.Event()
+2 -2
View File
@@ -1,4 +1,4 @@
File
==========================================================
====
.. autoclass:: github.File.File
.. autoclass:: github.File.File()
+2 -2
View File
@@ -1,4 +1,4 @@
Gist
==========================================================
====
.. autoclass:: github.Gist.Gist
.. autoclass:: github.Gist.Gist()
+2 -2
View File
@@ -1,4 +1,4 @@
GistComment
==========================================================
===========
.. autoclass:: github.GistComment.GistComment
.. autoclass:: github.GistComment.GistComment()
+2 -2
View File
@@ -1,4 +1,4 @@
GistFile
==========================================================
========
.. autoclass:: github.GistFile.GistFile
.. autoclass:: github.GistFile.GistFile()
+2 -2
View File
@@ -1,4 +1,4 @@
GistHistoryState
==========================================================
================
.. autoclass:: github.GistHistoryState.GistHistoryState
.. autoclass:: github.GistHistoryState.GistHistoryState()
+2 -2
View File
@@ -1,4 +1,4 @@
GitAuthor
==========================================================
=========
.. autoclass:: github.GitAuthor.GitAuthor
.. autoclass:: github.GitAuthor.GitAuthor()
+2 -2
View File
@@ -1,4 +1,4 @@
GitBlob
==========================================================
=======
.. autoclass:: github.GitBlob.GitBlob
.. autoclass:: github.GitBlob.GitBlob()
+2 -2
View File
@@ -1,4 +1,4 @@
GitCommit
==========================================================
=========
.. autoclass:: github.GitCommit.GitCommit
.. autoclass:: github.GitCommit.GitCommit()
+2 -2
View File
@@ -1,4 +1,4 @@
GitObject
==========================================================
=========
.. autoclass:: github.GitObject.GitObject
.. autoclass:: github.GitObject.GitObject()
+2 -2
View File
@@ -1,4 +1,4 @@
GitRef
==========================================================
======
.. autoclass:: github.GitRef.GitRef
.. autoclass:: github.GitRef.GitRef()
+2 -2
View File
@@ -1,4 +1,4 @@
GitTag
==========================================================
======
.. autoclass:: github.GitTag.GitTag
.. autoclass:: github.GitTag.GitTag()
+2 -2
View File
@@ -1,4 +1,4 @@
GitTree
==========================================================
=======
.. autoclass:: github.GitTree.GitTree
.. autoclass:: github.GitTree.GitTree()
+2 -2
View File
@@ -1,4 +1,4 @@
GitTreeElement
==========================================================
==============
.. autoclass:: github.GitTreeElement.GitTreeElement
.. autoclass:: github.GitTreeElement.GitTreeElement()
+2 -2
View File
@@ -1,4 +1,4 @@
GitignoreTemplate
==========================================================
=================
.. autoclass:: github.GitignoreTemplate.GitignoreTemplate
.. autoclass:: github.GitignoreTemplate.GitignoreTemplate()
+2 -2
View File
@@ -1,4 +1,4 @@
Hook
==========================================================
====
.. autoclass:: github.Hook.Hook
.. autoclass:: github.Hook.Hook()
+2 -2
View File
@@ -1,4 +1,4 @@
HookDescription
==========================================================
===============
.. autoclass:: github.HookDescription.HookDescription
.. autoclass:: github.HookDescription.HookDescription()
+2 -2
View File
@@ -1,4 +1,4 @@
HookResponse
==========================================================
============
.. autoclass:: github.HookResponse.HookResponse
.. autoclass:: github.HookResponse.HookResponse()
+2 -2
View File
@@ -1,4 +1,4 @@
Issue
==========================================================
=====
.. autoclass:: github.Issue.Issue
.. autoclass:: github.Issue.Issue()
+2 -2
View File
@@ -1,4 +1,4 @@
IssueComment
==========================================================
============
.. autoclass:: github.IssueComment.IssueComment
.. autoclass:: github.IssueComment.IssueComment()
+2 -2
View File
@@ -1,4 +1,4 @@
IssueEvent
==========================================================
==========
.. autoclass:: github.IssueEvent.IssueEvent
.. autoclass:: github.IssueEvent.IssueEvent()
+2 -2
View File
@@ -1,4 +1,4 @@
IssuePullRequest
==========================================================
================
.. autoclass:: github.IssuePullRequest.IssuePullRequest
.. autoclass:: github.IssuePullRequest.IssuePullRequest()
+2 -2
View File
@@ -1,4 +1,4 @@
Label
==========================================================
=====
.. autoclass:: github.Label.Label
.. autoclass:: github.Label.Label()
+2 -2
View File
@@ -1,4 +1,4 @@
Milestone
==========================================================
=========
.. autoclass:: github.Milestone.Milestone
.. autoclass:: github.Milestone.Milestone()
+2 -2
View File
@@ -1,4 +1,4 @@
NamedUser
==========================================================
=========
.. autoclass:: github.NamedUser.NamedUser
.. autoclass:: github.NamedUser.NamedUser()
+2 -2
View File
@@ -1,4 +1,4 @@
Organization
==========================================================
============
.. autoclass:: github.Organization.Organization
.. autoclass:: github.Organization.Organization()
+2 -2
View File
@@ -1,4 +1,4 @@
Permissions
==========================================================
===========
.. autoclass:: github.Permissions.Permissions
.. autoclass:: github.Permissions.Permissions()
+2 -2
View File
@@ -1,4 +1,4 @@
Plan
==========================================================
====
.. autoclass:: github.Plan.Plan
.. autoclass:: github.Plan.Plan()
+2 -2
View File
@@ -1,4 +1,4 @@
PullRequest
==========================================================
===========
.. autoclass:: github.PullRequest.PullRequest
.. autoclass:: github.PullRequest.PullRequest()
+2 -2
View File
@@ -1,4 +1,4 @@
PullRequestComment
==========================================================
==================
.. autoclass:: github.PullRequestComment.PullRequestComment
.. autoclass:: github.PullRequestComment.PullRequestComment()
@@ -1,4 +1,4 @@
PullRequestMergeStatus
==========================================================
======================
.. autoclass:: github.PullRequestMergeStatus.PullRequestMergeStatus
.. autoclass:: github.PullRequestMergeStatus.PullRequestMergeStatus()
+2 -2
View File
@@ -1,4 +1,4 @@
PullRequestPart
==========================================================
===============
.. autoclass:: github.PullRequestPart.PullRequestPart
.. autoclass:: github.PullRequestPart.PullRequestPart()
+2 -2
View File
@@ -1,4 +1,4 @@
Repository
==========================================================
==========
.. autoclass:: github.Repository.Repository
.. autoclass:: github.Repository.Repository()
+2 -2
View File
@@ -1,4 +1,4 @@
RepositoryKey
==========================================================
=============
.. autoclass:: github.RepositoryKey.RepositoryKey
.. autoclass:: github.RepositoryKey.RepositoryKey()
+2 -2
View File
@@ -1,4 +1,4 @@
Tag
==========================================================
===
.. autoclass:: github.Tag.Tag
.. autoclass:: github.Tag.Tag()
+2 -2
View File
@@ -1,4 +1,4 @@
Team
==========================================================
====
.. autoclass:: github.Team.Team
.. autoclass:: github.Team.Team()
+2 -2
View File
@@ -1,4 +1,4 @@
UserKey
==========================================================
=======
.. autoclass:: github.UserKey.UserKey
.. autoclass:: github.UserKey.UserKey()
+9 -15
View File
@@ -32,42 +32,36 @@ class Generator():
def getClassDocstring(self, className):
if className in self.privateClasses:
return []
return None
else:
return [
"Please modify this generated docstring for class :class:`github." + className + "." + className + "`.",
]
return []
def getMemberDocstring(self, className, memberName):
if className in self.privateClasses:
return []
return None
elif className in self.classDescriptions:
classDescription = self.classDescriptions[className]
if memberName in classDescription.properties:
return [
"Please modify this generated docstring for property :attr:`github." + className + "." + className + "." + memberName + "`.",
"",
":type: " + self.__formatType(classDescription.properties[memberName])
]
elif memberName in classDescription.methods:
return [
"Please modify this generated docstring for method :func:`github." + className + "." + className + "." + memberName + "`.",
"",
":calls: " + (classDescription.methods[memberName].verb or "WTF") + " " + (classDescription.methods[memberName].url or "WTF"),
":authentication level: please modify",
":calls: `" + classDescription.methods[memberName].verb + " " + classDescription.methods[memberName].url + " <http://developer.github.com/v3/>`_",
# ":auth. level: ?",
] + [
":param " + parameterName + ": " + self.__formatType(parameterType) for parameterName, parameterType in classDescription.methods[memberName].parameters.items()
] + [
":rtype: " + self.__formatType(str(classDescription.methods[memberName].returnType))
]
elif memberName.startswith("_"): # private member
return []
return None
else:
print "Unknown member", className, memberName
return []
return None
else:
print "Unknown class", className
return []
return None
def __formatType(self, type):
if type.startswith( "`PaginatedList` of "):
@@ -173,7 +167,7 @@ class Generator():
nextDefIsClassMethod = line == " @classmethod"
def formatDocstring(self, indent, lines):
if len(lines) != 0:
if lines is not None:
yield indent + '"""'
for docStringLine in lines:
yield indent + docStringLine
+2 -2
View File
@@ -17,12 +17,12 @@
import setuptools
import textwrap
version = "1.9.1"
version = "1.10.0"
if __name__ == "__main__":
setuptools.setup(
name="PyGithub",
version=version,
version="version",
description="Use the full Github API v3",
author="Vincent Jacques",
author_email="vincent@vincent-jacques.net",