diff --git a/doc/conf.py b/doc/conf.py index 958de460..777741a9 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -250,6 +250,8 @@ with open("github_objects.rst", "w") as github_objects: github_objects.write("Github objects\n") github_objects.write("==============\n") github_objects.write("\n") + github_objects.write(".. autoclass:: github.GithubObject.GithubObject()\n") + github_objects.write("\n") github_objects.write(".. toctree::\n") for obj in ["AuthenticatedUser", "Authorization", "AuthorizationApplication", "Branch", "Commit", "CommitComment", "CommitStats", "CommitStatus", "Comparison", "ContentFile", "Download", "Event", "File", "Gist", "GistComment", "GistFile", "GistHistoryState", "GitAuthor", "GitBlob", "GitCommit", "GitObject", "GitignoreTemplate", "GitRef", "GitTag", "GitTree", "GitTreeElement", "Hook", "HookDescription", "HookResponse", "Issue", "IssueComment", "IssueEvent", "IssuePullRequest", "Label", "Milestone", "NamedUser", "Notification", "NotificationSubject", "Organization", "Permissions", "Plan", "PullRequest", "PullRequestComment", "PullRequestMergeStatus", "PullRequestPart", "Repository", "RepositoryKey", "Tag", "Team", "UserKey"]: diff --git a/github/GithubObject.py b/github/GithubObject.py index adfe31c2..99884297 100644 --- a/github/GithubObject.py +++ b/github/GithubObject.py @@ -25,6 +25,9 @@ NotSet = _NotSetType() class GithubObject(object): + """ + Base class for all classes representing objects returned by the API. + """ def __init__(self, requester, attributes, completed): self._requester = requester self._initAttributes() diff --git a/github/MainClass.py b/github/MainClass.py index a424f5d8..7b1a04eb 100644 --- a/github/MainClass.py +++ b/github/MainClass.py @@ -285,7 +285,7 @@ class Github(object): def create_from_raw_data(self, klass, raw_data): """ - Creates an object from raw_data previously obtained by ``myObject.raw_data`` + Creates an object from raw_data previously obtained by :attr:`github.GithubObject.GithubObject.raw_data` :param klass: the class of the object to create :param raw_data: dict diff --git a/github/__init__.py b/github/__init__.py index f1253cbc..3f20d650 100644 --- a/github/__init__.py +++ b/github/__init__.py @@ -17,6 +17,8 @@ The primary class you will instanciate is :class:`github.MainClass.Github`. From its ``get_``, ``create_`` methods, you will obtain instances of all Github objects like :class:`github.NamedUser.NamedUser` or :class:`github.Repository.Repository`. + +All classes inherit from :class:`github.GithubObject.GithubObject`. """ import logging