8000 Fix cross-module Sphinx references · fcassirer/github3.py@f4dd7d3 · GitHub
[go: up one dir, main page]

Skip to content 65F1

Commit f4dd7d3

Browse files
committed
Fix cross-module Sphinx references
1 parent 55698cc commit f4dd7d3

File tree

7 files changed

+67
-52
lines changed

7 files changed

+67
-52
lines changed

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: 1 addition & 1 deletion
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}

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)

github3/repos/comparison.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ def __init__(self, compare):
4242
self.diff_url = compare.get('diff_url')
4343
#: Patch URL at GitHub for the comparison.
4444
self.patch_url = compare.get('patch_url')
45-
#: :class:`RepoCommit <RepoCommit>` object representing the base of
46-
#: comparison.
45+
#: :class:`RepoCommit <github3.repos.commit.RepoCommit>` object
46+
#: representing the base of comparison.
4747
self.base_commit = RepoCommit(compare.get('base_commit'), None)
4848
#: Behind or ahead.
4949
self.status = compare.get('status')
@@ -53,7 +53,8 @@ def __init__(self, compare):
5353
self.behind_by = compare.get('behind_by')
5454
#: Number of commits difference in the comparison.
5555
self.total_commits = compare.get('total_commits')
56-
#: List of :class:`RepoCommit <RepoCommit>` objects.
56+
#: List of :class:`RepoCommit <github3.repos.commit.RepoCommit>`
57+
#: objects.
5758
self.commits = [RepoCommit(com) for com in compare.get('commits')]
5859
#: List of dicts describing the files modified.
5960
self.files = compare.get('files', [])

0 commit comments

Comments
 (0)
0