diff --git a/doc/changes.rst b/doc/changes.rst index 7481368f..421544ca 100644 --- a/doc/changes.rst +++ b/doc/changes.rst @@ -1,6 +1,9 @@ Change log ========== +Stable versions +~~~~~~~~~~~~~~~ + `Version 1.9.1 `_ (November 20th, 2012) -------------------------------------------------------------------------------------------------------------- @@ -99,6 +102,9 @@ Version 1.1 (June 20th, 2012) * More usable exceptions raised in case on problems with the API * Some bugs and limitations fixed, special thanks to `bilderbuchi `_, `roskakori `_ and `tallforasmurf `_ for reporting them! +Pre-release versions +~~~~~~~~~~~~~~~~~~~~ + `Version 0.7 `_ (May 26th, 2012) ------------------------------------------------------------------------------------------------------ diff --git a/doc/conf.py b/doc/conf.py index 36c6f316..0a74614a 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -241,3 +241,7 @@ texinfo_documents = [ # How to display URL addresses: 'footnote', 'no', or 'inline'. #texinfo_show_urls = 'footnote' + +autodoc_default_flags = [ "members" ] +autodoc_member_order = "bysource" +autoclass_content = "both" diff --git a/doc/github.rst b/doc/github.rst new file mode 100644 index 00000000..1668ca3a --- /dev/null +++ b/doc/github.rst @@ -0,0 +1,4 @@ +Main class: Github +================== + +.. autoclass:: github.Github.Github diff --git a/doc/github_objects.rst b/doc/github_objects.rst new file mode 100644 index 00000000..f63e8913 --- /dev/null +++ b/doc/github_objects.rst @@ -0,0 +1,51 @@ +Github objects +============== + +.. toctree:: + github_objects/AuthenticatedUser + github_objects/Authorization + github_objects/AuthorizationApplication + github_objects/Branch + github_objects/Commit + github_objects/CommitComment + github_objects/CommitStats + github_objects/CommitStatus + github_objects/Comparison + github_objects/ContentFile + github_objects/Download + github_objects/Event + github_objects/File + github_objects/Gist + github_objects/GistComment + github_objects/GistFile + github_objects/GistHistoryState + github_objects/GitAuthor + github_objects/GitBlob + github_objects/GitCommit + github_objects/GitObject + github_objects/GitRef + github_objects/GitTag + github_objects/GitTree + github_objects/GitTreeElement + github_objects/Hook + github_objects/HookDescription + github_objects/HookResponse + github_objects/Issue + github_objects/IssueComment + github_objects/IssueEvent + github_objects/IssuePullRequest + github_objects/Label + github_objects/Milestone + github_objects/NamedUser + github_objects/Organization + github_objects/Permissions + github_objects/Plan + github_objects/PullRequest + github_objects/PullRequestComment + github_objects/PullRequestMergeStatus + github_objects/PullRequestPart + github_objects/Repository + github_objects/RepositoryKey + github_objects/Tag + github_objects/Team + github_objects/UserKey diff --git a/doc/github_objects/AuthenticatedUser.rst b/doc/github_objects/AuthenticatedUser.rst new file mode 100644 index 00000000..095a0a97 --- /dev/null +++ b/doc/github_objects/AuthenticatedUser.rst @@ -0,0 +1,4 @@ +AuthenticatedUser +========================================================== + +.. autoclass:: github.AuthenticatedUser.AuthenticatedUser diff --git a/doc/github_objects/Authorization.rst b/doc/github_objects/Authorization.rst new file mode 100644 index 00000000..8491d5de --- /dev/null +++ b/doc/github_objects/Authorization.rst @@ -0,0 +1,4 @@ +Authorization +========================================================== + +.. autoclass:: github.Authorization.Authorization diff --git a/doc/github_objects/AuthorizationApplication.rst b/doc/github_objects/AuthorizationApplication.rst new file mode 100644 index 00000000..b7e8f219 --- /dev/null +++ b/doc/github_objects/AuthorizationApplication.rst @@ -0,0 +1,4 @@ +AuthorizationApplication +========================================================== + +.. autoclass:: github.AuthorizationApplication.AuthorizationApplication diff --git a/doc/github_objects/Branch.rst b/doc/github_objects/Branch.rst new file mode 100644 index 00000000..fdf1ef4f --- /dev/null +++ b/doc/github_objects/Branch.rst @@ -0,0 +1,4 @@ +Branch +========================================================== + +.. autoclass:: github.Branch.Branch diff --git a/doc/github_objects/Commit.rst b/doc/github_objects/Commit.rst new file mode 100644 index 00000000..daf8830e --- /dev/null +++ b/doc/github_objects/Commit.rst @@ -0,0 +1,4 @@ +Commit +========================================================== + +.. autoclass:: github.Commit.Commit diff --git a/doc/github_objects/CommitComment.rst b/doc/github_objects/CommitComment.rst new file mode 100644 index 00000000..0f9fb2cd --- /dev/null +++ b/doc/github_objects/CommitComment.rst @@ -0,0 +1,4 @@ +CommitComment +========================================================== + +.. autoclass:: github.CommitComment.CommitComment diff --git a/doc/github_objects/CommitStats.rst b/doc/github_objects/CommitStats.rst new file mode 100644 index 00000000..334442dd --- /dev/null +++ b/doc/github_objects/CommitStats.rst @@ -0,0 +1,4 @@ +CommitStats +========================================================== + +.. autoclass:: github.CommitStats.CommitStats diff --git a/doc/github_objects/CommitStatus.rst b/doc/github_objects/CommitStatus.rst new file mode 100644 index 00000000..7236142e --- /dev/null +++ b/doc/github_objects/CommitStatus.rst @@ -0,0 +1,4 @@ +CommitStatus +========================================================== + +.. autoclass:: github.CommitStatus.CommitStatus diff --git a/doc/github_objects/Comparison.rst b/doc/github_objects/Comparison.rst new file mode 100644 index 00000000..49e80857 --- /dev/null +++ b/doc/github_objects/Comparison.rst @@ -0,0 +1,4 @@ +Comparison +========================================================== + +.. autoclass:: github.Comparison.Comparison diff --git a/doc/github_objects/ContentFile.rst b/doc/github_objects/ContentFile.rst new file mode 100644 index 00000000..e9ca26f5 --- /dev/null +++ b/doc/github_objects/ContentFile.rst @@ -0,0 +1,4 @@ +ContentFile +========================================================== + +.. autoclass:: github.ContentFile.ContentFile diff --git a/doc/github_objects/Download.rst b/doc/github_objects/Download.rst new file mode 100644 index 00000000..d85511a3 --- /dev/null +++ b/doc/github_objects/Download.rst @@ -0,0 +1,4 @@ +Download +========================================================== + +.. autoclass:: github.Download.Download diff --git a/doc/github_objects/Event.rst b/doc/github_objects/Event.rst new file mode 100644 index 00000000..48e2dd5b --- /dev/null +++ b/doc/github_objects/Event.rst @@ -0,0 +1,4 @@ +Event +========================================================== + +.. autoclass:: github.Event.Event diff --git a/doc/github_objects/File.rst b/doc/github_objects/File.rst new file mode 100644 index 00000000..a0393508 --- /dev/null +++ b/doc/github_objects/File.rst @@ -0,0 +1,4 @@ +File +========================================================== + +.. autoclass:: github.File.File diff --git a/doc/github_objects/Gist.rst b/doc/github_objects/Gist.rst new file mode 100644 index 00000000..3b2725ba --- /dev/null +++ b/doc/github_objects/Gist.rst @@ -0,0 +1,4 @@ +Gist +========================================================== + +.. autoclass:: github.Gist.Gist diff --git a/doc/github_objects/GistComment.rst b/doc/github_objects/GistComment.rst new file mode 100644 index 00000000..94753575 --- /dev/null +++ b/doc/github_objects/GistComment.rst @@ -0,0 +1,4 @@ +GistComment +========================================================== + +.. autoclass:: github.GistComment.GistComment diff --git a/doc/github_objects/GistFile.rst b/doc/github_objects/GistFile.rst new file mode 100644 index 00000000..24ff4dd4 --- /dev/null +++ b/doc/github_objects/GistFile.rst @@ -0,0 +1,4 @@ +GistFile +========================================================== + +.. autoclass:: github.GistFile.GistFile diff --git a/doc/github_objects/GistHistoryState.rst b/doc/github_objects/GistHistoryState.rst new file mode 100644 index 00000000..8fdb00e9 --- /dev/null +++ b/doc/github_objects/GistHistoryState.rst @@ -0,0 +1,4 @@ +GistHistoryState +========================================================== + +.. autoclass:: github.GistHistoryState.GistHistoryState diff --git a/doc/github_objects/GitAuthor.rst b/doc/github_objects/GitAuthor.rst new file mode 100644 index 00000000..83c6d72d --- /dev/null +++ b/doc/github_objects/GitAuthor.rst @@ -0,0 +1,4 @@ +GitAuthor +========================================================== + +.. autoclass:: github.GitAuthor.GitAuthor diff --git a/doc/github_objects/GitBlob.rst b/doc/github_objects/GitBlob.rst new file mode 100644 index 00000000..8aca00fa --- /dev/null +++ b/doc/github_objects/GitBlob.rst @@ -0,0 +1,4 @@ +GitBlob +========================================================== + +.. autoclass:: github.GitBlob.GitBlob diff --git a/doc/github_objects/GitCommit.rst b/doc/github_objects/GitCommit.rst new file mode 100644 index 00000000..6681a55c --- /dev/null +++ b/doc/github_objects/GitCommit.rst @@ -0,0 +1,4 @@ +GitCommit +========================================================== + +.. autoclass:: github.GitCommit.GitCommit diff --git a/doc/github_objects/GitObject.rst b/doc/github_objects/GitObject.rst new file mode 100644 index 00000000..67dcd244 --- /dev/null +++ b/doc/github_objects/GitObject.rst @@ -0,0 +1,4 @@ +GitObject +========================================================== + +.. autoclass:: github.GitObject.GitObject diff --git a/doc/github_objects/GitRef.rst b/doc/github_objects/GitRef.rst new file mode 100644 index 00000000..aa292070 --- /dev/null +++ b/doc/github_objects/GitRef.rst @@ -0,0 +1,4 @@ +GitRef +========================================================== + +.. autoclass:: github.GitRef.GitRef diff --git a/doc/github_objects/GitTag.rst b/doc/github_objects/GitTag.rst new file mode 100644 index 00000000..f5f6f3c5 --- /dev/null +++ b/doc/github_objects/GitTag.rst @@ -0,0 +1,4 @@ +GitTag +========================================================== + +.. autoclass:: github.GitTag.GitTag diff --git a/doc/github_objects/GitTree.rst b/doc/github_objects/GitTree.rst new file mode 100644 index 00000000..b520cf53 --- /dev/null +++ b/doc/github_objects/GitTree.rst @@ -0,0 +1,4 @@ +GitTree +========================================================== + +.. autoclass:: github.GitTree.GitTree diff --git a/doc/github_objects/GitTreeElement.rst b/doc/github_objects/GitTreeElement.rst new file mode 100644 index 00000000..041b07b0 --- /dev/null +++ b/doc/github_objects/GitTreeElement.rst @@ -0,0 +1,4 @@ +GitTreeElement +========================================================== + +.. autoclass:: github.GitTreeElement.GitTreeElement diff --git a/doc/github_objects/Hook.rst b/doc/github_objects/Hook.rst new file mode 100644 index 00000000..01cb0a0b --- /dev/null +++ b/doc/github_objects/Hook.rst @@ -0,0 +1,4 @@ +Hook +========================================================== + +.. autoclass:: github.Hook.Hook diff --git a/doc/github_objects/HookDescription.rst b/doc/github_objects/HookDescription.rst new file mode 100644 index 00000000..f5f36279 --- /dev/null +++ b/doc/github_objects/HookDescription.rst @@ -0,0 +1,4 @@ +HookDescription +========================================================== + +.. autoclass:: github.HookDescription.HookDescription diff --git a/doc/github_objects/HookResponse.rst b/doc/github_objects/HookResponse.rst new file mode 100644 index 00000000..0cfc9f0c --- /dev/null +++ b/doc/github_objects/HookResponse.rst @@ -0,0 +1,4 @@ +HookResponse +========================================================== + +.. autoclass:: github.HookResponse.HookResponse diff --git a/doc/github_objects/Issue.rst b/doc/github_objects/Issue.rst new file mode 100644 index 00000000..4cc7c468 --- /dev/null +++ b/doc/github_objects/Issue.rst @@ -0,0 +1,4 @@ +Issue +========================================================== + +.. autoclass:: github.Issue.Issue diff --git a/doc/github_objects/IssueComment.rst b/doc/github_objects/IssueComment.rst new file mode 100644 index 00000000..d84da1c9 --- /dev/null +++ b/doc/github_objects/IssueComment.rst @@ -0,0 +1,4 @@ +IssueComment +========================================================== + +.. autoclass:: github.IssueComment.IssueComment diff --git a/doc/github_objects/IssueEvent.rst b/doc/github_objects/IssueEvent.rst new file mode 100644 index 00000000..58152331 --- /dev/null +++ b/doc/github_objects/IssueEvent.rst @@ -0,0 +1,4 @@ +IssueEvent +========================================================== + +.. autoclass:: github.IssueEvent.IssueEvent diff --git a/doc/github_objects/IssuePullRequest.rst b/doc/github_objects/IssuePullRequest.rst new file mode 100644 index 00000000..135459d4 --- /dev/null +++ b/doc/github_objects/IssuePullRequest.rst @@ -0,0 +1,4 @@ +IssuePullRequest +========================================================== + +.. autoclass:: github.IssuePullRequest.IssuePullRequest diff --git a/doc/github_objects/Label.rst b/doc/github_objects/Label.rst new file mode 100644 index 00000000..d5e91273 --- /dev/null +++ b/doc/github_objects/Label.rst @@ -0,0 +1,4 @@ +Label +========================================================== + +.. autoclass:: github.Label.Label diff --git a/doc/github_objects/Milestone.rst b/doc/github_objects/Milestone.rst new file mode 100644 index 00000000..2f041b38 --- /dev/null +++ b/doc/github_objects/Milestone.rst @@ -0,0 +1,4 @@ +Milestone +========================================================== + +.. autoclass:: github.Milestone.Milestone diff --git a/doc/github_objects/NamedUser.rst b/doc/github_objects/NamedUser.rst new file mode 100644 index 00000000..06c726ee --- /dev/null +++ b/doc/github_objects/NamedUser.rst @@ -0,0 +1,4 @@ +NamedUser +========================================================== + +.. autoclass:: github.NamedUser.NamedUser diff --git a/doc/github_objects/Organization.rst b/doc/github_objects/Organization.rst new file mode 100644 index 00000000..a98e2132 --- /dev/null +++ b/doc/github_objects/Organization.rst @@ -0,0 +1,4 @@ +Organization +========================================================== + +.. autoclass:: github.Organization.Organization diff --git a/doc/github_objects/Permissions.rst b/doc/github_objects/Permissions.rst new file mode 100644 index 00000000..fcfa43e9 --- /dev/null +++ b/doc/github_objects/Permissions.rst @@ -0,0 +1,4 @@ +Permissions +========================================================== + +.. autoclass:: github.Permissions.Permissions diff --git a/doc/github_objects/Plan.rst b/doc/github_objects/Plan.rst new file mode 100644 index 00000000..d3a6fe1c --- /dev/null +++ b/doc/github_objects/Plan.rst @@ -0,0 +1,4 @@ +Plan +========================================================== + +.. autoclass:: github.Plan.Plan diff --git a/doc/github_objects/PullRequest.rst b/doc/github_objects/PullRequest.rst new file mode 100644 index 00000000..e33d6c70 --- /dev/null +++ b/doc/github_objects/PullRequest.rst @@ -0,0 +1,4 @@ +PullRequest +========================================================== + +.. autoclass:: github.PullRequest.PullRequest diff --git a/doc/github_objects/PullRequestComment.rst b/doc/github_objects/PullRequestComment.rst new file mode 100644 index 00000000..a3fe74ab --- /dev/null +++ b/doc/github_objects/PullRequestComment.rst @@ -0,0 +1,4 @@ +PullRequestComment +========================================================== + +.. autoclass:: github.PullRequestComment.PullRequestComment diff --git a/doc/github_objects/PullRequestMergeStatus.rst b/doc/github_objects/PullRequestMergeStatus.rst new file mode 100644 index 00000000..ea4a682d --- /dev/null +++ b/doc/github_objects/PullRequestMergeStatus.rst @@ -0,0 +1,4 @@ +PullRequestMergeStatus +========================================================== + +.. autoclass:: github.PullRequestMergeStatus.PullRequestMergeStatus diff --git a/doc/github_objects/PullRequestPart.rst b/doc/github_objects/PullRequestPart.rst new file mode 100644 index 00000000..03815376 --- /dev/null +++ b/doc/github_objects/PullRequestPart.rst @@ -0,0 +1,4 @@ +PullRequestPart +========================================================== + +.. autoclass:: github.PullRequestPart.PullRequestPart diff --git a/doc/github_objects/Repository.rst b/doc/github_objects/Repository.rst new file mode 100644 index 00000000..f288710c --- /dev/null +++ b/doc/github_objects/Repository.rst @@ -0,0 +1,4 @@ +Repository +========================================================== + +.. autoclass:: github.Repository.Repository diff --git a/doc/github_objects/RepositoryKey.rst b/doc/github_objects/RepositoryKey.rst new file mode 100644 index 00000000..51b3b153 --- /dev/null +++ b/doc/github_objects/RepositoryKey.rst @@ -0,0 +1,4 @@ +RepositoryKey +========================================================== + +.. autoclass:: github.RepositoryKey.RepositoryKey diff --git a/doc/github_objects/Tag.rst b/doc/github_objects/Tag.rst new file mode 100644 index 00000000..d7dd8fb1 --- /dev/null +++ b/doc/github_objects/Tag.rst @@ -0,0 +1,4 @@ +Tag +========================================================== + +.. autoclass:: github.Tag.Tag diff --git a/doc/github_objects/Team.rst b/doc/github_objects/Team.rst new file mode 100644 index 00000000..2fe5d9b4 --- /dev/null +++ b/doc/github_objects/Team.rst @@ -0,0 +1,4 @@ +Team +========================================================== + +.. autoclass:: github.Team.Team diff --git a/doc/github_objects/UserKey.rst b/doc/github_objects/UserKey.rst new file mode 100644 index 00000000..a037de36 --- /dev/null +++ b/doc/github_objects/UserKey.rst @@ -0,0 +1,4 @@ +UserKey +========================================================== + +.. autoclass:: github.UserKey.UserKey diff --git a/doc/index.rst b/doc/index.rst index 6ac7e7b8..d3f312cb 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -1,30 +1,9 @@ -.. PyGithub documentation master file, created by - sphinx-quickstart on Thu Sep 13 22:51:42 2012. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -Welcome to PyGithub's documentation! -==================================== - -This is still a draft, do not use it. - -Contents: +PyGithub +======== .. toctree:: :maxdepth: 2 + introduction + reference changes - - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` - -.. automodule:: github.Github - :members: - -.. automodule:: github.Organization - :members: diff --git a/doc/introduction.rst b/doc/introduction.rst new file mode 100644 index 00000000..c516b331 --- /dev/null +++ b/doc/introduction.rst @@ -0,0 +1,2 @@ +Introduction +============ diff --git a/doc/reference.rst b/doc/reference.rst new file mode 100644 index 00000000..dc44734d --- /dev/null +++ b/doc/reference.rst @@ -0,0 +1,10 @@ +Reference +========= + +.. automodule:: github + :no-members: + +.. toctree:: + github + github_objects + utilities diff --git a/doc/utilities.rst b/doc/utilities.rst new file mode 100644 index 00000000..338dc2af --- /dev/null +++ b/doc/utilities.rst @@ -0,0 +1,20 @@ +Utilities +========= + +Logging +------- + +.. autofunction:: github.enable_console_debug_logging + +Pagination +---------- + +.. autoclass:: github.PaginatedList.PaginatedList() + + +Input classes +------------- + +.. autoclass:: github.InputFileContent.InputFileContent +.. autoclass:: github.InputGitAuthor.InputGitAuthor +.. autoclass:: github.InputGitTreeElement.InputGitTreeElement diff --git a/generateDocstrings.py b/generateDocstrings.py index ddc6b35e..c992b6b2 100755 --- a/generateDocstrings.py +++ b/generateDocstrings.py @@ -35,7 +35,7 @@ class Generator(): return [] else: return [ - "Please edit this generated docstring for class " + className + ".", + "Please modify this generated docstring for class :class:`github." + className + "." + className + "`.", ] def getMemberDocstring(self, className, memberName): @@ -45,20 +45,20 @@ class Generator(): classDescription = self.classDescriptions[className] if memberName in classDescription.properties: return [ - "Please edit this generated docstring for property " + className + "." + memberName + ".", + "Please modify this generated docstring for property :attr:`github." + className + "." + className + "." + memberName + "`.", "", - ":type: " + classDescription.properties[memberName] + ":type: " + self.__formatType(classDescription.properties[memberName]) ] elif memberName in classDescription.methods: return [ - "Please edit this generated docstring for method " + className + "." + memberName + ".", - "", - "Calls " + (classDescription.methods[memberName].verb or "WTF") + " " + (classDescription.methods[memberName].url or "WTF"), + "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", ] + [ - ":param " + parameterName + ": " + parameterType for parameterName, parameterType in classDescription.methods[memberName].parameters.items() + ":param " + parameterName + ": " + self.__formatType(parameterType) for parameterName, parameterType in classDescription.methods[memberName].parameters.items() ] + [ - ":return: " + str(classDescription.methods[memberName].returnType) + ":rtype: " + self.__formatType(str(classDescription.methods[memberName].returnType)) ] elif memberName.startswith("_"): # private member return [] @@ -69,6 +69,34 @@ class Generator(): print "Unknown class", className return [] + def __formatType(self, type): + if type.startswith( "`PaginatedList` of "): + return ":class:`github.PaginatedList.PaginatedList` of " + self.__formatType(type[19:]) + elif type.startswith( "list of "): + return "list of " + self.__formatType(type[8:]) + elif type.startswith( "dict of string to "): + return "dict of string to " + self.__formatType(type[18:]) + elif type.startswith( "`" ) and type.endswith("`"): + type = type[1:-1] + return ":class:`github." + type + "." + type + "`" + elif type == "`Milestone` or \"none\" or \"*\"": + return ":class:`github.Milestone.Milestone` or \"none\" or \"*\"" + elif type == "`NamedUser` or \"none\" or \"*\"": + return ":class:`github.NamedUser.NamedUser` or \"none\" or \"*\"" + elif type == "`Milestone` or None": + return ":class:`github.Milestone.Milestone` or None" + elif type == "`NamedUser` or None": + return ":class:`github.NamedUser.NamedUser` or None" + elif type in [ + "bool", "string", "None", "integer", + "datetime.datetime", "date", + "\"open\" or \"closed\"", + "dict", "(int, int)" + ]: + return type + else: + raise Exception( "Unknown type " + type) + def __init__(self): pass diff --git a/github/Github.py b/github/Github.py index db7ddd4f..dfe326f0 100644 --- a/github/Github.py +++ b/github/Github.py @@ -33,6 +33,25 @@ DEFAULT_TIMEOUT = 10 class Github(object): def __init__(self, login_or_token=None, password=None, base_url=DEFAULT_BASE_URL, timeout=DEFAULT_TIMEOUT, client_id=None, client_secret=None, user_agent=None): + """ + Please edit this generated docstring for method :func:`Github.__init__`. + + :param login_or_token: string + :param password: string + :param base_url: string + :param timeout: integer + :param client_id: string + :param client_secret: string + :param user_agent: string + """ + + assert login_or_token is None or isinstance(login_or_token, (str, unicode)), login_or_token + assert password is None or isinstance(password, (str, unicode)), password + assert base_url is None or isinstance(base_url, (str, unicode)), base_url + assert timeout is None or isinstance(timeout, (int, long)), timeout + assert client_id is None or isinstance(client_id, (str, unicode)), client_id + assert client_secret is None or isinstance(client_secret, (str, unicode)), client_secret + assert user_agent is None or isinstance(user_agent, (str, unicode)), user_agent self.__requester = Requester(login_or_token, password, base_url, timeout, client_id, client_secret, user_agent) def __get_FIX_REPO_GET_GIT_REF(self): diff --git a/github/InputFileContent.py b/github/InputFileContent.py index b3234622..505bde62 100644 --- a/github/InputFileContent.py +++ b/github/InputFileContent.py @@ -16,6 +16,13 @@ class InputFileContent(object): def __init__(self, content): + """ + Please edit this generated docstring for method :func:`github.InputFileContent.InputFileContent.__init__`. + + :param content: string + """ + + assert isinstance(content, (str, unicode)), content self.__content = content @property diff --git a/github/InputGitAuthor.py b/github/InputGitAuthor.py index 4dbacb2c..b4edef9e 100644 --- a/github/InputGitAuthor.py +++ b/github/InputGitAuthor.py @@ -16,6 +16,17 @@ class InputGitAuthor(object): def __init__(self, name, email, date): + """ + Please edit this generated docstring for method :func:`github.InputGitAuthor.InputGitAuthor.__init__`. + + :param name: string + :param email: string + :param date: string + """ + + assert isinstance(name, (str, unicode)), name + assert isinstance(email, (str, unicode)), email + assert isinstance(date, (str, unicode)), date # @todo Datetime? self.__name = name self.__email = email self.__date = date diff --git a/github/InputGitTreeElement.py b/github/InputGitTreeElement.py index 5211fa99..8a233366 100644 --- a/github/InputGitTreeElement.py +++ b/github/InputGitTreeElement.py @@ -18,6 +18,21 @@ import github.GithubObject class InputGitTreeElement(object): def __init__(self, path, mode, type, content=github.GithubObject.NotSet, sha=github.GithubObject.NotSet): + """ + Please edit this generated docstring for method :func:`github.InputGitTreeElement.InputGitTreeElement.__init__`. + + :param path: string + :param mode: string + :param type: string + :param content: string + :param sha: string + """ + + assert isinstance(path, (str, unicode)), path + assert isinstance(mode, (str, unicode)), mode + assert isinstance(type, (str, unicode)), type + assert isinstance(content, (str, unicode)), content + assert isinstance(sha, (str, unicode)), sha self.__path = path self.__mode = mode self.__type = type diff --git a/github/__init__.py b/github/__init__.py index 269bb7bd..799f638c 100644 --- a/github/__init__.py +++ b/github/__init__.py @@ -13,6 +13,12 @@ # You should have received a copy of the GNU Lesser General Public License along with PyGithub. If not, see . +""" +The primary class you will instanciate is :class:`github.Github.Github`. +From its `get_`, `create_` methods, you will obtain instances of all Github objects +like :class:`github.NamedUser.NamedUser` or :class:`github.Repository.Repository`. +""" + import logging from Github import Github @@ -23,6 +29,8 @@ from InputGitTreeElement import InputGitTreeElement def enable_console_debug_logging(): # pragma no cover + """Is this included""" + logger = logging.getLogger("github") logger.setLevel(logging.DEBUG) logger.addHandler(logging.StreamHandler())