mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
Improve
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
AuthenticatedUser
|
||||
==========================================================
|
||||
=================
|
||||
|
||||
.. autoclass:: github.AuthenticatedUser.AuthenticatedUser
|
||||
.. autoclass:: github.AuthenticatedUser.AuthenticatedUser()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Branch
|
||||
==========================================================
|
||||
======
|
||||
|
||||
.. autoclass:: github.Branch.Branch
|
||||
.. autoclass:: github.Branch.Branch()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Commit
|
||||
==========================================================
|
||||
======
|
||||
|
||||
.. autoclass:: github.Commit.Commit
|
||||
.. autoclass:: github.Commit.Commit()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CommitComment
|
||||
==========================================================
|
||||
=============
|
||||
|
||||
.. autoclass:: github.CommitComment.CommitComment
|
||||
.. autoclass:: github.CommitComment.CommitComment()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CommitStats
|
||||
==========================================================
|
||||
===========
|
||||
|
||||
.. autoclass:: github.CommitStats.CommitStats
|
||||
.. autoclass:: github.CommitStats.CommitStats()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CommitStatus
|
||||
==========================================================
|
||||
============
|
||||
|
||||
.. autoclass:: github.CommitStatus.CommitStatus
|
||||
.. autoclass:: github.CommitStatus.CommitStatus()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Comparison
|
||||
==========================================================
|
||||
==========
|
||||
|
||||
.. autoclass:: github.Comparison.Comparison
|
||||
.. autoclass:: github.Comparison.Comparison()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
ContentFile
|
||||
==========================================================
|
||||
===========
|
||||
|
||||
.. autoclass:: github.ContentFile.ContentFile
|
||||
.. autoclass:: github.ContentFile.ContentFile()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Download
|
||||
==========================================================
|
||||
========
|
||||
|
||||
.. autoclass:: github.Download.Download
|
||||
.. autoclass:: github.Download.Download()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Event
|
||||
==========================================================
|
||||
=====
|
||||
|
||||
.. autoclass:: github.Event.Event
|
||||
.. autoclass:: github.Event.Event()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
File
|
||||
==========================================================
|
||||
====
|
||||
|
||||
.. autoclass:: github.File.File
|
||||
.. autoclass:: github.File.File()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Gist
|
||||
==========================================================
|
||||
====
|
||||
|
||||
.. autoclass:: github.Gist.Gist
|
||||
.. autoclass:: github.Gist.Gist()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
GistComment
|
||||
==========================================================
|
||||
===========
|
||||
|
||||
.. autoclass:: github.GistComment.GistComment
|
||||
.. autoclass:: github.GistComment.GistComment()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
GistFile
|
||||
==========================================================
|
||||
========
|
||||
|
||||
.. autoclass:: github.GistFile.GistFile
|
||||
.. autoclass:: github.GistFile.GistFile()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
GistHistoryState
|
||||
==========================================================
|
||||
================
|
||||
|
||||
.. autoclass:: github.GistHistoryState.GistHistoryState
|
||||
.. autoclass:: github.GistHistoryState.GistHistoryState()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
GitAuthor
|
||||
==========================================================
|
||||
=========
|
||||
|
||||
.. autoclass:: github.GitAuthor.GitAuthor
|
||||
.. autoclass:: github.GitAuthor.GitAuthor()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
GitBlob
|
||||
==========================================================
|
||||
=======
|
||||
|
||||
.. autoclass:: github.GitBlob.GitBlob
|
||||
.. autoclass:: github.GitBlob.GitBlob()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
GitCommit
|
||||
==========================================================
|
||||
=========
|
||||
|
||||
.. autoclass:: github.GitCommit.GitCommit
|
||||
.. autoclass:: github.GitCommit.GitCommit()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
GitObject
|
||||
==========================================================
|
||||
=========
|
||||
|
||||
.. autoclass:: github.GitObject.GitObject
|
||||
.. autoclass:: github.GitObject.GitObject()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
GitRef
|
||||
==========================================================
|
||||
======
|
||||
|
||||
.. autoclass:: github.GitRef.GitRef
|
||||
.. autoclass:: github.GitRef.GitRef()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
GitTag
|
||||
==========================================================
|
||||
======
|
||||
|
||||
.. autoclass:: github.GitTag.GitTag
|
||||
.. autoclass:: github.GitTag.GitTag()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
GitTree
|
||||
==========================================================
|
||||
=======
|
||||
|
||||
.. autoclass:: github.GitTree.GitTree
|
||||
.. autoclass:: github.GitTree.GitTree()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
GitTreeElement
|
||||
==========================================================
|
||||
==============
|
||||
|
||||
.. autoclass:: github.GitTreeElement.GitTreeElement
|
||||
.. autoclass:: github.GitTreeElement.GitTreeElement()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
GitignoreTemplate
|
||||
==========================================================
|
||||
=================
|
||||
|
||||
.. autoclass:: github.GitignoreTemplate.GitignoreTemplate
|
||||
.. autoclass:: github.GitignoreTemplate.GitignoreTemplate()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Hook
|
||||
==========================================================
|
||||
====
|
||||
|
||||
.. autoclass:: github.Hook.Hook
|
||||
.. autoclass:: github.Hook.Hook()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
HookDescription
|
||||
==========================================================
|
||||
===============
|
||||
|
||||
.. autoclass:: github.HookDescription.HookDescription
|
||||
.. autoclass:: github.HookDescription.HookDescription()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
HookResponse
|
||||
==========================================================
|
||||
============
|
||||
|
||||
.. autoclass:: github.HookResponse.HookResponse
|
||||
.. autoclass:: github.HookResponse.HookResponse()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Issue
|
||||
==========================================================
|
||||
=====
|
||||
|
||||
.. autoclass:: github.Issue.Issue
|
||||
.. autoclass:: github.Issue.Issue()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
IssueComment
|
||||
==========================================================
|
||||
============
|
||||
|
||||
.. autoclass:: github.IssueComment.IssueComment
|
||||
.. autoclass:: github.IssueComment.IssueComment()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
IssueEvent
|
||||
==========================================================
|
||||
==========
|
||||
|
||||
.. autoclass:: github.IssueEvent.IssueEvent
|
||||
.. autoclass:: github.IssueEvent.IssueEvent()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
IssuePullRequest
|
||||
==========================================================
|
||||
================
|
||||
|
||||
.. autoclass:: github.IssuePullRequest.IssuePullRequest
|
||||
.. autoclass:: github.IssuePullRequest.IssuePullRequest()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Label
|
||||
==========================================================
|
||||
=====
|
||||
|
||||
.. autoclass:: github.Label.Label
|
||||
.. autoclass:: github.Label.Label()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Milestone
|
||||
==========================================================
|
||||
=========
|
||||
|
||||
.. autoclass:: github.Milestone.Milestone
|
||||
.. autoclass:: github.Milestone.Milestone()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
NamedUser
|
||||
==========================================================
|
||||
=========
|
||||
|
||||
.. autoclass:: github.NamedUser.NamedUser
|
||||
.. autoclass:: github.NamedUser.NamedUser()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Organization
|
||||
==========================================================
|
||||
============
|
||||
|
||||
.. autoclass:: github.Organization.Organization
|
||||
.. autoclass:: github.Organization.Organization()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Permissions
|
||||
==========================================================
|
||||
===========
|
||||
|
||||
.. autoclass:: github.Permissions.Permissions
|
||||
.. autoclass:: github.Permissions.Permissions()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Plan
|
||||
==========================================================
|
||||
====
|
||||
|
||||
.. autoclass:: github.Plan.Plan
|
||||
.. autoclass:: github.Plan.Plan()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
PullRequest
|
||||
==========================================================
|
||||
===========
|
||||
|
||||
.. autoclass:: github.PullRequest.PullRequest
|
||||
.. autoclass:: github.PullRequest.PullRequest()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
PullRequestPart
|
||||
==========================================================
|
||||
===============
|
||||
|
||||
.. autoclass:: github.PullRequestPart.PullRequestPart
|
||||
.. autoclass:: github.PullRequestPart.PullRequestPart()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Repository
|
||||
==========================================================
|
||||
==========
|
||||
|
||||
.. autoclass:: github.Repository.Repository
|
||||
.. autoclass:: github.Repository.Repository()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
RepositoryKey
|
||||
==========================================================
|
||||
=============
|
||||
|
||||
.. autoclass:: github.RepositoryKey.RepositoryKey
|
||||
.. autoclass:: github.RepositoryKey.RepositoryKey()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Tag
|
||||
==========================================================
|
||||
===
|
||||
|
||||
.. autoclass:: github.Tag.Tag
|
||||
.. autoclass:: github.Tag.Tag()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Team
|
||||
==========================================================
|
||||
====
|
||||
|
||||
.. autoclass:: github.Team.Team
|
||||
.. autoclass:: github.Team.Team()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
UserKey
|
||||
==========================================================
|
||||
=======
|
||||
|
||||
.. autoclass:: github.UserKey.UserKey
|
||||
.. autoclass:: github.UserKey.UserKey()
|
||||
|
||||
+9
-15
@@ -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
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user