8000 Merge pull request #236 from bgilbert/doc-xrefs · jhermann/github3.py@d5999ff · GitHub
[go: up one dir, main page]

Skip to content

Commit d5999ff

Browse files
committed
Merge pull request sigmavirus24#236 from bgilbert/doc-xrefs
Fix up documentation cross references
2 parents 315fc90 + 9ca82ca commit d5999ff

File tree

13 files changed

+145
-54
lines changed

13 files changed

+145
-54
lines changed

docs/gists.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,28 @@ classes should never be instantiated by the user (developer) directly.
1717
Gist Objects
1818
------------
1919

20+
.. module:: github3.gists.gist
21+
2022
.. autoclass:: github3.gists.gist.Gist
2123
:inherited-members:
2224

2325
------
2426

27+
.. module:: github3.gists.comment
28+
2529
.. autoclass:: github3.gists.comment.GistComment
2630
:inherited-members:
2731

2832
------
2933

34+
.. module:: github3.gists.file
35+
3036
.. autoclass:: github3.gists.file.GistFile
3137
:inherited-members:
3238

3339
------
3440

41+
.. module:: github3.gists.history
42+
3543
.. autoclass:: github3.gists.history.GistHistory
3644
:inherited-members:

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ Modules
7474
github
7575
issues
7676
models
77+
notifications
7778
orgs
7879
pulls
7980
repos

docs/issues.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,35 @@ This part of the documentation covers the module which handles :class:`Issue
1414
Issue Objects
1515
-------------
1616

17+
.. module:: github3.issues.issue
18+
1719
.. autoclass:: github3.issues.issue.Issue
1820
:inherited-members:
1921

2022
------
2123

24+
.. module:: github3.issues.comment
25+
2226
.. autoclass:: github3.issues.comment.IssueComment
2327
:inherited-members:
2428

2529
------
2630

31+
.. module:: github3.issues.event
32+
2733
.. autoclass:: github3.issues.event.IssueEvent
2834
:inherited-members:
2935

3036
------
3137

38+
.. module:: github3.issues.milestone
39+
3240
.. autoclass:: github3.issues.milestone.Milestone
3341
:inherited-members:
3442

3543
------
3644

45+
.. module:: github3.issues.label
46+
3747
.. autoclass:: github3.issues.label.Label
3848
:inherited-members:

docs/notifications.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.. module:: github3
2+
.. module:: github3.notifications
3+
4+
Notifications
5+
=============
6+
7+
This part of the documentation covers the :class:`Thread <Thread>` and
8+
:class:`Subscription <Subscription>` objects.
9+
10+
Notification Objects
11+
--------------------
12+
13+
.. autoclass:: Thread
14+
:inherited-members:
15+
16+
------
17+
18+
.. autoclass:: Subscription
19+
:inherited-members:

docs/repos.rst

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ This part of the documentation covers:
1212
- :class:`Deployment <github3.repos.deployment.Deployment>`
1313
- :class:`DeploymentStatus <github3.repos.deployment.DeploymentStatus>`
1414
- :class:`Hook <github3.repos.hook.Hook>`
15+
- :class:`PagesInfo <github3.repos.pages.PagesInfo>`
16+
- :class:`PagesBuild <github3.repos.pages.PagesBuild>`
1517
- :class:`Release <g F438 ithub3.repos.release.Release>`
1618
- :class:`RepoTag <github3.repos.tag.RepoTag>`
1719
- :class:`RepoComment <github3.repos.comment.RepoComment>`
@@ -35,21 +37,29 @@ sections of the GitHub documentation.
3537
Repository Objects
3638
------------------
3739

40+
.. module:: github3.repos.repo
41+
3842
.. autoclass:: github3.repos.repo.Repository
3943
:inherited-members:
4044

4145
---------
4246

47+
.. module:: github3.repos.branch
48+
4349
.. autoclass:: github3.repos.branch.Branch
4450
:members:
4551

4652
---------
4753

54+
.. module:: github3.repos.contents
55+
4856
.. autoclass:: github3.repos.contents.Contents
4957
:members:
5058

5159
---------
5260

61+
.. module:: github3.repos.deployment
62+
5363
.. autoclass:: github3.repos.deployment.Deployment
5464
:members:
5565

@@ -60,6 +70,8 @@ Repository Objects
6070

6171
---------
6272

73+
.. module:: github3.repos.release
74+
6375
.. autoclass:: github3.repos.release.Release
6476
:members:
6577

@@ -70,16 +82,34 @@ Repository Objects
7082

7183
---------
7284

85+
.. module:: github3.repos.hook
86+
7387
.. autoclass:: github3.repos.hook.Hook
7488
:members:
7589

7690
---------
7791

92+
.. module:: github3.repos.pages
93+
94+
.. autoclass:: github3.repos.pages.PagesInfo
95+
:members:
96+
97+
---------
98+
99+
.. autoclass:: github3.repos.pages.PagesBuild
100+
:members:
101+
102+
---------
103+
104+
.. module:: github3.repos.tag
105+
78106
.. autoclass:: github3.repos.tag.RepoTag
79107
:members:
80108

81109
---------
82110

111+
.. module:: github3.repos.comment
112+
83113
More information about this class can be found in the official documentation
84114
about `comments <http://developer.github.com/v3/repos/comments/>`_.
85115

@@ -88,20 +118,28 @@ about `comments <http://developer.github.com/v3/repos/comments/>`_.
88118

89119
---------
90120

121+
.. module:: github3.repos.commit
122+
91123
.. autoclass:: github3.repos.commit.RepoCommit
92124
:members:
93125

94126
---------
95127

128+
.. module:: github3.repos.comparison
129+
96130
.. autoclass:: github3.repos.comparison.Comparison
97131
:members:
98132

99133
---------
100134

135+
.. module:: github3.repos.status
136+
101137
.. autoclass:: github3.repos.status.Status
102138
:members:
103139

104140
---------
105141

142+
.. module:: github3.repos.stats
143+
106144
.. autoclass:: github3.repos.stats.ContributorStats
107145
:members:

github3/gists/gist.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ def __init__(self, data, session=None):
8383
#: Number of files in this gist.
8484
self.files = len(self._files)
8585

86-
#: History of this gist, list of :class:`GistHistory <GistHistory>`
86+
#: History of this gist, list of
87+
#: :class:`GistHistory <github3.gists.history.GistHistory>`
8788
self.history = [GistHistory(h, self) for h in data.get('history', [])]
8889

8990
## New urls

github3/issues/issue.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,14 @@ def __init__(self, issue, session=None):
6262
self.html_url = issue.get('html_url')
6363
#: Unique ID for the issue.
6464
self.id = issue.get('id')
65-
#: Returns the list of :class:`Label <Label>`\ s on this issue.
65+
#: Returns the list of :class:`Label <github3.issues.label.Label>`\ s
66+
#: on this issue.
6667
self.labels = [Label(l, self._session) for l in issue.get('labels')]
6768
labels_url = issue.get('labels_url')
6869
#: Labels URL Template. Expand with ``name``
6970
self.labels_urlt = URITemplate(labels_url) if labels_url else None
70-
#: :class:`Milestone <Milestone>` this issue was assigned to.
71+
#: :class:`Milestone <github3.issues.milestone.Milestone>` this
72+
#: issue was assigned to.
7173
self.milestone = None
7274
if issue.get('milestone'):
7375
self.milestone = Milestone(issue.get('milestone'), self._session)
@@ -145,7 +147,7 @@ def comment(self, id_num):
145147
sigmavirus24/Todo.txt-python, the first comment's id is 4150787.
146148
147149
:param int id_num: (required), comment id, see example above
148-
:returns: :class:`IssueComment <IssueComment>`
150+
:returns: :class:`IssueComment <github3.issues.comment.IssueComment>`
149151
"""
150152
json = None
151153
if int(id_num) > 0: # Might as well check that it's positive
@@ -160,7 +162,7 @@ def create_comment(self, body):
160162
"""Create a comment on this issue.
161163
162164
:param str body: (required), comment body
163-
:returns: :class:`IssueComment <IssueComment>`
165+
:returns: :class:`IssueComment <github3.issues.comment.IssueComment>`
164166
"""
165167
json = None
166168
if body:
@@ -213,7 +215,8 @@ def iter_comments(self, number=-1):
213215
"""Iterate over the comments on this issue.
214216
215217
:param int number: (optional), number of comments to iterate over
216-
:returns: iterator of :class:`IssueComment <IssueComment>`
218+
:returns: iterator of
219+
:class:`IssueComment <github3.issues.comment.IssueComment>`\ s
217220
"""
218221
url = self._build_url('comments', base_url=self._api)
219222
return self._iter(int(number), url, IssueComment)
@@ -223,7 +226,8 @@ def iter_events(self, number=-1):
223226
224227
:param int number: (optional), number of events to return. Default: -1
225228
returns all events available.
226-
:returns: generator of :class:`IssueEvent <IssueEvent>`\ s
229+
:returns: generator of
230+
:class:`IssueEvent <github3.issues.event.IssueEvent>`\ s
227231
"""
228232
url = self._build_url('events', base_url=self._api)
229233
return self._iter(int(number), url, IssueEvent)
@@ -235,6 +239,7 @@ def iter_labels(self, number=-1, etag=None):
235239
returns all labels applied to this issue.
236240
:param str etag: (optional), ETag from a previous request to the same
237241
endpoint
242+
:returns: generator of :class:`Label <github3.issues.label.Label>`\ s
238243
"""
239244
url = self._build_url('labels', base_url=self._api)
240245
return self._iter(int(number), url, Label, etag=etag)

github3/issues/milestone.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def iter_labels(self, number=-1, etag=None):
6868
:param int number: (optional), number of labels to return. Default: -1
6969
returns all available labels.
7070
:param str etag: (optional), ETag header from a previous response
71-
:returns: generator of :class:`Label <Label>`\ s
71+
:returns: generator of :class:`Label <github3.issues.label.Label>`\ s
7272
"""
7373
url = self._build_url('labels', base_url=self._api)
7474
return self._iter(int(number), url, Label, etag=etag)

github3/notifications.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def set_subscription(self, subscribed, ignored):
8686
be received from this thread.
8787
:param bool ignored: (required), determines if notifications should be
8888
ignored from this thread.
89-
:returns: :class;`Subscription <Subscription>`
89+
:returns: :class:`Subscription <Subscription>`
9090
"""
9191
url = self._build_url('subscription', base_url=self._api)
9292
sub = {'subscribed': subscribed, 'ignored': ignored}
@@ -108,7 +108,7 @@ class Subscription(GitHubCore):
108108
repository subscription information.
109109
110110
See also:
111-
developer.github.com/v3/activity/notifications/#get-a-thread-subscription
111+
http://developer.github.com/v3/activity/notifications/#get-a-thread-subscription
112112
"""
113113
def __init__(self, sub, session=None):
114114
super(Subscription, self).__init__(sub, session)

github3/repos/branch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ def __init__(self, branch, session=None):
1414
super(Branch, self).__init__(branch, session)
1515
#: Name of the branch.
1616
self.name = branch.get('name')
17-
#: Returns the branch's :class:`RepoCommit <RepoCommit>` or
18-
#: ``None``.
17+
#: Returns the branch's
18+
#: :class:`RepoCommit <github3.repos.commit.RepoCommit>` or ``None``.
1919
self.commit = branch.get('commit')
2020
if self.commit:
2121
self.commit = RepoCommit(self.commit, self._session)

0 commit comments

Comments
 (0)
0