diff --git a/doc/github_objects/AuthenticatedUser.rst b/doc/github_objects/AuthenticatedUser.rst index 095a0a97..0ac14ac6 100644 --- a/doc/github_objects/AuthenticatedUser.rst +++ b/doc/github_objects/AuthenticatedUser.rst @@ -1,4 +1,4 @@ AuthenticatedUser -========================================================== +================= -.. autoclass:: github.AuthenticatedUser.AuthenticatedUser +.. autoclass:: github.AuthenticatedUser.AuthenticatedUser() diff --git a/doc/github_objects/Authorization.rst b/doc/github_objects/Authorization.rst index 8491d5de..dbcc1054 100644 --- a/doc/github_objects/Authorization.rst +++ b/doc/github_objects/Authorization.rst @@ -1,4 +1,4 @@ Authorization -========================================================== +============= -.. autoclass:: github.Authorization.Authorization +.. autoclass:: github.Authorization.Authorization() diff --git a/doc/github_objects/AuthorizationApplication.rst b/doc/github_objects/AuthorizationApplication.rst index b7e8f219..72011674 100644 --- a/doc/github_objects/AuthorizationApplication.rst +++ b/doc/github_objects/AuthorizationApplication.rst @@ -1,4 +1,4 @@ AuthorizationApplication -========================================================== +======================== -.. autoclass:: github.AuthorizationApplication.AuthorizationApplication +.. autoclass:: github.AuthorizationApplication.AuthorizationApplication() diff --git a/doc/github_objects/Branch.rst b/doc/github_objects/Branch.rst index fdf1ef4f..a680f83d 100644 --- a/doc/github_objects/Branch.rst +++ b/doc/github_objects/Branch.rst @@ -1,4 +1,4 @@ Branch -========================================================== +====== -.. autoclass:: github.Branch.Branch +.. autoclass:: github.Branch.Branch() diff --git a/doc/github_objects/Commit.rst b/doc/github_objects/Commit.rst index daf8830e..4778d154 100644 --- a/doc/github_objects/Commit.rst +++ b/doc/github_objects/Commit.rst @@ -1,4 +1,4 @@ Commit -========================================================== +====== -.. autoclass:: github.Commit.Commit +.. autoclass:: github.Commit.Commit() diff --git a/doc/github_objects/CommitComment.rst b/doc/github_objects/CommitComment.rst index 0f9fb2cd..752b204e 100644 --- a/doc/github_objects/CommitComment.rst +++ b/doc/github_objects/CommitComment.rst @@ -1,4 +1,4 @@ CommitComment -========================================================== +============= -.. autoclass:: github.CommitComment.CommitComment +.. autoclass:: github.CommitComment.CommitComment() diff --git a/doc/github_objects/CommitStats.rst b/doc/github_objects/CommitStats.rst index 334442dd..1b3a6863 100644 --- a/doc/github_objects/CommitStats.rst +++ b/doc/github_objects/CommitStats.rst @@ -1,4 +1,4 @@ CommitStats -========================================================== +=========== -.. autoclass:: github.CommitStats.CommitStats +.. autoclass:: github.CommitStats.CommitStats() diff --git a/doc/github_objects/CommitStatus.rst b/doc/github_objects/CommitStatus.rst index 7236142e..5357f9af 100644 --- a/doc/github_objects/CommitStatus.rst +++ b/doc/github_objects/CommitStatus.rst @@ -1,4 +1,4 @@ CommitStatus -========================================================== +============ -.. autoclass:: github.CommitStatus.CommitStatus +.. autoclass:: github.CommitStatus.CommitStatus() diff --git a/doc/github_objects/Comparison.rst b/doc/github_objects/Comparison.rst index 49e80857..387193a1 100644 --- a/doc/github_objects/Comparison.rst +++ b/doc/github_objects/Comparison.rst @@ -1,4 +1,4 @@ Comparison -========================================================== +========== -.. autoclass:: github.Comparison.Comparison +.. autoclass:: github.Comparison.Comparison() diff --git a/doc/github_objects/ContentFile.rst b/doc/github_objects/ContentFile.rst index e9ca26f5..99abc5ac 100644 --- a/doc/github_objects/ContentFile.rst +++ b/doc/github_objects/ContentFile.rst @@ -1,4 +1,4 @@ ContentFile -========================================================== +=========== -.. autoclass:: github.ContentFile.ContentFile +.. autoclass:: github.ContentFile.ContentFile() diff --git a/doc/github_objects/Download.rst b/doc/github_objects/Download.rst index d85511a3..12105e50 100644 --- a/doc/github_objects/Download.rst +++ b/doc/github_objects/Download.rst @@ -1,4 +1,4 @@ Download -========================================================== +======== -.. autoclass:: github.Download.Download +.. autoclass:: github.Download.Download() diff --git a/doc/github_objects/Event.rst b/doc/github_objects/Event.rst index 48e2dd5b..7580a3e1 100644 --- a/doc/github_objects/Event.rst +++ b/doc/github_objects/Event.rst @@ -1,4 +1,4 @@ Event -========================================================== +===== -.. autoclass:: github.Event.Event +.. autoclass:: github.Event.Event() diff --git a/doc/github_objects/File.rst b/doc/github_objects/File.rst index a0393508..56f36480 100644 --- a/doc/github_objects/File.rst +++ b/doc/github_objects/File.rst @@ -1,4 +1,4 @@ File -========================================================== +==== -.. autoclass:: github.File.File +.. autoclass:: github.File.File() diff --git a/doc/github_objects/Gist.rst b/doc/github_objects/Gist.rst index 3b2725ba..6873968a 100644 --- a/doc/github_objects/Gist.rst +++ b/doc/github_objects/Gist.rst @@ -1,4 +1,4 @@ Gist -========================================================== +==== -.. autoclass:: github.Gist.Gist +.. autoclass:: github.Gist.Gist() diff --git a/doc/github_objects/GistComment.rst b/doc/github_objects/GistComment.rst index 94753575..f1b739eb 100644 --- a/doc/github_objects/GistComment.rst +++ b/doc/github_objects/GistComment.rst @@ -1,4 +1,4 @@ GistComment -========================================================== +=========== -.. autoclass:: github.GistComment.GistComment +.. autoclass:: github.GistComment.GistComment() diff --git a/doc/github_objects/GistFile.rst b/doc/github_objects/GistFile.rst index 24ff4dd4..17ec2487 100644 --- a/doc/github_objects/GistFile.rst +++ b/doc/github_objects/GistFile.rst @@ -1,4 +1,4 @@ GistFile -========================================================== +======== -.. autoclass:: github.GistFile.GistFile +.. autoclass:: github.GistFile.GistFile() diff --git a/doc/github_objects/GistHistoryState.rst b/doc/github_objects/GistHistoryState.rst index 8fdb00e9..4d615107 100644 --- a/doc/github_objects/GistHistoryState.rst +++ b/doc/github_objects/GistHistoryState.rst @@ -1,4 +1,4 @@ GistHistoryState -========================================================== +================ -.. autoclass:: github.GistHistoryState.GistHistoryState +.. autoclass:: github.GistHistoryState.GistHistoryState() diff --git a/doc/github_objects/GitAuthor.rst b/doc/github_objects/GitAuthor.rst index 83c6d72d..238a2b15 100644 --- a/doc/github_objects/GitAuthor.rst +++ b/doc/github_objects/GitAuthor.rst @@ -1,4 +1,4 @@ GitAuthor -========================================================== +========= -.. autoclass:: github.GitAuthor.GitAuthor +.. autoclass:: github.GitAuthor.GitAuthor() diff --git a/doc/github_objects/GitBlob.rst b/doc/github_objects/GitBlob.rst index 8aca00fa..8c883f11 100644 --- a/doc/github_objects/GitBlob.rst +++ b/doc/github_objects/GitBlob.rst @@ -1,4 +1,4 @@ GitBlob -========================================================== +======= -.. autoclass:: github.GitBlob.GitBlob +.. autoclass:: github.GitBlob.GitBlob() diff --git a/doc/github_objects/GitCommit.rst b/doc/github_objects/GitCommit.rst index 6681a55c..56fbc557 100644 --- a/doc/github_objects/GitCommit.rst +++ b/doc/github_objects/GitCommit.rst @@ -1,4 +1,4 @@ GitCommit -========================================================== +========= -.. autoclass:: github.GitCommit.GitCommit +.. autoclass:: github.GitCommit.GitCommit() diff --git a/doc/github_objects/GitObject.rst b/doc/github_objects/GitObject.rst index 67dcd244..903ed56a 100644 --- a/doc/github_objects/GitObject.rst +++ b/doc/github_objects/GitObject.rst @@ -1,4 +1,4 @@ GitObject -========================================================== +========= -.. autoclass:: github.GitObject.GitObject +.. autoclass:: github.GitObject.GitObject() diff --git a/doc/github_objects/GitRef.rst b/doc/github_objects/GitRef.rst index aa292070..ba134099 100644 --- a/doc/github_objects/GitRef.rst +++ b/doc/github_objects/GitRef.rst @@ -1,4 +1,4 @@ GitRef -========================================================== +====== -.. autoclass:: github.GitRef.GitRef +.. autoclass:: github.GitRef.GitRef() diff --git a/doc/github_objects/GitTag.rst b/doc/github_objects/GitTag.rst index f5f6f3c5..bb5eb8f5 100644 --- a/doc/github_objects/GitTag.rst +++ b/doc/github_objects/GitTag.rst @@ -1,4 +1,4 @@ GitTag -========================================================== +====== -.. autoclass:: github.GitTag.GitTag +.. autoclass:: github.GitTag.GitTag() diff --git a/doc/github_objects/GitTree.rst b/doc/github_objects/GitTree.rst index b520cf53..b7137126 100644 --- a/doc/github_objects/GitTree.rst +++ b/doc/github_objects/GitTree.rst @@ -1,4 +1,4 @@ GitTree -========================================================== +======= -.. autoclass:: github.GitTree.GitTree +.. autoclass:: github.GitTree.GitTree() diff --git a/doc/github_objects/GitTreeElement.rst b/doc/github_objects/GitTreeElement.rst index 041b07b0..346c6668 100644 --- a/doc/github_objects/GitTreeElement.rst +++ b/doc/github_objects/GitTreeElement.rst @@ -1,4 +1,4 @@ GitTreeElement -========================================================== +============== -.. autoclass:: github.GitTreeElement.GitTreeElement +.. autoclass:: github.GitTreeElement.GitTreeElement() diff --git a/doc/github_objects/GitignoreTemplate.rst b/doc/github_objects/GitignoreTemplate.rst index 2fd1f08f..8b1da472 100644 --- a/doc/github_objects/GitignoreTemplate.rst +++ b/doc/github_objects/GitignoreTemplate.rst @@ -1,4 +1,4 @@ GitignoreTemplate -========================================================== +================= -.. autoclass:: github.GitignoreTemplate.GitignoreTemplate +.. autoclass:: github.GitignoreTemplate.GitignoreTemplate() diff --git a/doc/github_objects/Hook.rst b/doc/github_objects/Hook.rst index 01cb0a0b..08ecada6 100644 --- a/doc/github_objects/Hook.rst +++ b/doc/github_objects/Hook.rst @@ -1,4 +1,4 @@ Hook -========================================================== +==== -.. autoclass:: github.Hook.Hook +.. autoclass:: github.Hook.Hook() diff --git a/doc/github_objects/HookDescription.rst b/doc/github_objects/HookDescription.rst index f5f36279..29acd7c2 100644 --- a/doc/github_objects/HookDescription.rst +++ b/doc/github_objects/HookDescription.rst @@ -1,4 +1,4 @@ HookDescription -========================================================== +=============== -.. autoclass:: github.HookDescription.HookDescription +.. autoclass:: github.HookDescription.HookDescription() diff --git a/doc/github_objects/HookResponse.rst b/doc/github_objects/HookResponse.rst index 0cfc9f0c..a042aa98 100644 --- a/doc/github_objects/HookResponse.rst +++ b/doc/github_objects/HookResponse.rst @@ -1,4 +1,4 @@ HookResponse -========================================================== +============ -.. autoclass:: github.HookResponse.HookResponse +.. autoclass:: github.HookResponse.HookResponse() diff --git a/doc/github_objects/Issue.rst b/doc/github_objects/Issue.rst index 4cc7c468..28a36690 100644 --- a/doc/github_objects/Issue.rst +++ b/doc/github_objects/Issue.rst @@ -1,4 +1,4 @@ Issue -========================================================== +===== -.. autoclass:: github.Issue.Issue +.. autoclass:: github.Issue.Issue() diff --git a/doc/github_objects/IssueComment.rst b/doc/github_objects/IssueComment.rst index d84da1c9..ab769381 100644 --- a/doc/github_objects/IssueComment.rst +++ b/doc/github_objects/IssueComment.rst @@ -1,4 +1,4 @@ IssueComment -========================================================== +============ -.. autoclass:: github.IssueComment.IssueComment +.. autoclass:: github.IssueComment.IssueComment() diff --git a/doc/github_objects/IssueEvent.rst b/doc/github_objects/IssueEvent.rst index 58152331..1bcd17a5 100644 --- a/doc/github_objects/IssueEvent.rst +++ b/doc/github_objects/IssueEvent.rst @@ -1,4 +1,4 @@ IssueEvent -========================================================== +========== -.. autoclass:: github.IssueEvent.IssueEvent +.. autoclass:: github.IssueEvent.IssueEvent() diff --git a/doc/github_objects/IssuePullRequest.rst b/doc/github_objects/IssuePullRequest.rst index 135459d4..169daffc 100644 --- a/doc/github_objects/IssuePullRequest.rst +++ b/doc/github_objects/IssuePullRequest.rst @@ -1,4 +1,4 @@ IssuePullRequest -========================================================== +================ -.. autoclass:: github.IssuePullRequest.IssuePullRequest +.. autoclass:: github.IssuePullRequest.IssuePullRequest() diff --git a/doc/github_objects/Label.rst b/doc/github_objects/Label.rst index d5e91273..54514d54 100644 --- a/doc/github_objects/Label.rst +++ b/doc/github_objects/Label.rst @@ -1,4 +1,4 @@ Label -========================================================== +===== -.. autoclass:: github.Label.Label +.. autoclass:: github.Label.Label() diff --git a/doc/github_objects/Milestone.rst b/doc/github_objects/Milestone.rst index 2f041b38..cb5daeff 100644 --- a/doc/github_objects/Milestone.rst +++ b/doc/github_objects/Milestone.rst @@ -1,4 +1,4 @@ Milestone -========================================================== +========= -.. autoclass:: github.Milestone.Milestone +.. autoclass:: github.Milestone.Milestone() diff --git a/doc/github_objects/NamedUser.rst b/doc/github_objects/NamedUser.rst index 06c726ee..c6eb0d19 100644 --- a/doc/github_objects/NamedUser.rst +++ b/doc/github_objects/NamedUser.rst @@ -1,4 +1,4 @@ NamedUser -========================================================== +========= -.. autoclass:: github.NamedUser.NamedUser +.. autoclass:: github.NamedUser.NamedUser() diff --git a/doc/github_objects/Organization.rst b/doc/github_objects/Organization.rst index a98e2132..fee7d4f8 100644 --- a/doc/github_objects/Organization.rst +++ b/doc/github_objects/Organization.rst @@ -1,4 +1,4 @@ Organization -========================================================== +============ -.. autoclass:: github.Organization.Organization +.. autoclass:: github.Organization.Organization() diff --git a/doc/github_objects/Permissions.rst b/doc/github_objects/Permissions.rst index fcfa43e9..21f630f1 100644 --- a/doc/github_objects/Permissions.rst +++ b/doc/github_objects/Permissions.rst @@ -1,4 +1,4 @@ Permissions -========================================================== +=========== -.. autoclass:: github.Permissions.Permissions +.. autoclass:: github.Permissions.Permissions() diff --git a/doc/github_objects/Plan.rst b/doc/github_objects/Plan.rst index d3a6fe1c..2087244b 100644 --- a/doc/github_objects/Plan.rst +++ b/doc/github_objects/Plan.rst @@ -1,4 +1,4 @@ Plan -========================================================== +==== -.. autoclass:: github.Plan.Plan +.. autoclass:: github.Plan.Plan() diff --git a/doc/github_objects/PullRequest.rst b/doc/github_objects/PullRequest.rst index e33d6c70..98b917b3 100644 --- a/doc/github_objects/PullRequest.rst +++ b/doc/github_objects/PullRequest.rst @@ -1,4 +1,4 @@ PullRequest -========================================================== +=========== -.. autoclass:: github.PullRequest.PullRequest +.. autoclass:: github.PullRequest.PullRequest() diff --git a/doc/github_objects/PullRequestComment.rst b/doc/github_objects/PullRequestComment.rst index a3fe74ab..0216b6e6 100644 --- a/doc/github_objects/PullRequestComment.rst +++ b/doc/github_objects/PullRequestComment.rst @@ -1,4 +1,4 @@ PullRequestComment -========================================================== +================== -.. autoclass:: github.PullRequestComment.PullRequestComment +.. autoclass:: github.PullRequestComment.PullRequestComment() diff --git a/doc/github_objects/PullRequestMergeStatus.rst b/doc/github_objects/PullRequestMergeStatus.rst index ea4a682d..bd6424e5 100644 --- a/doc/github_objects/PullRequestMergeStatus.rst +++ b/doc/github_objects/PullRequestMergeStatus.rst @@ -1,4 +1,4 @@ PullRequestMergeStatus -========================================================== +====================== -.. autoclass:: github.PullRequestMergeStatus.PullRequestMergeStatus +.. autoclass:: github.PullRequestMergeStatus.PullRequestMergeStatus() diff --git a/doc/github_objects/PullRequestPart.rst b/doc/github_objects/PullRequestPart.rst index 03815376..e84e544e 100644 --- a/doc/github_objects/PullRequestPart.rst +++ b/doc/github_objects/PullRequestPart.rst @@ -1,4 +1,4 @@ PullRequestPart -========================================================== +=============== -.. autoclass:: github.PullRequestPart.PullRequestPart +.. autoclass:: github.PullRequestPart.PullRequestPart() diff --git a/doc/github_objects/Repository.rst b/doc/github_objects/Repository.rst index f288710c..46af45d0 100644 --- a/doc/github_objects/Repository.rst +++ b/doc/github_objects/Repository.rst @@ -1,4 +1,4 @@ Repository -========================================================== +========== -.. autoclass:: github.Repository.Repository +.. autoclass:: github.Repository.Repository() diff --git a/doc/github_objects/RepositoryKey.rst b/doc/github_objects/RepositoryKey.rst index 51b3b153..5c4bfd45 100644 --- a/doc/github_objects/RepositoryKey.rst +++ b/doc/github_objects/RepositoryKey.rst @@ -1,4 +1,4 @@ RepositoryKey -========================================================== +============= -.. autoclass:: github.RepositoryKey.RepositoryKey +.. autoclass:: github.RepositoryKey.RepositoryKey() diff --git a/doc/github_objects/Tag.rst b/doc/github_objects/Tag.rst index d7dd8fb1..698ebf1a 100644 --- a/doc/github_objects/Tag.rst +++ b/doc/github_objects/Tag.rst @@ -1,4 +1,4 @@ Tag -========================================================== +=== -.. autoclass:: github.Tag.Tag +.. autoclass:: github.Tag.Tag() diff --git a/doc/github_objects/Team.rst b/doc/github_objects/Team.rst index 2fe5d9b4..848990c2 100644 --- a/doc/github_objects/Team.rst +++ b/doc/github_objects/Team.rst @@ -1,4 +1,4 @@ Team -========================================================== +==== -.. autoclass:: github.Team.Team +.. autoclass:: github.Team.Team() diff --git a/doc/github_objects/UserKey.rst b/doc/github_objects/UserKey.rst index a037de36..e1e51f9d 100644 --- a/doc/github_objects/UserKey.rst +++ b/doc/github_objects/UserKey.rst @@ -1,4 +1,4 @@ UserKey -========================================================== +======= -.. autoclass:: github.UserKey.UserKey +.. autoclass:: github.UserKey.UserKey() diff --git a/generateDocstrings.py b/generateDocstrings.py index c992b6b2..2a852d33 100755 --- a/generateDocstrings.py +++ b/generateDocstrings.py @@ -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 + " `_", + # ":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 diff --git a/setup.py b/setup.py index 8098b211..4452a4e5 100755 --- a/setup.py +++ b/setup.py @@ -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",