Skip to content

Commit b2de949

Browse files
committed
Clean up docs
1 parent 085107a commit b2de949

File tree

3 files changed

+22
-9
lines changed

3 files changed

+22
-9
lines changed

docs/entities.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,15 @@ GogsTeam
4141

4242
.. autoclass:: gogs_client.entities::GogsTeam()
4343
:members:
44+
45+
GogsBranch
46+
----------
47+
48+
.. autoclass:: gogs_client.entities::GogsBranch()
49+
:members:
50+
51+
GogsCommit
52+
----------
53+
54+
.. autoclass:: gogs_client.entities::GogsCommit()
55+
:members:

gogs_client/entities.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class GogsRepo(GogsEntity):
101101

102102
#: The owner of the repository
103103
#:
104-
#: :type: entities.GogsUser
104+
#: :type: :class:`~GogsUser`
105105
owner = attr.ib(convert=lambda parsed_json: GogsUser.from_json(parsed_json))
106106

107107
#: The name of the repository
@@ -138,18 +138,18 @@ def urls(self):
138138
"""
139139
URLs of the repository
140140
141-
:type: GogsRepo.Urls
141+
:type: :class:`~GogsRepo.Urls`
142142
"""
143143
return GogsRepo.Urls(self._html_url, self._clone_url, self._ssh_url)
144144

145145
#: Permissions for the repository
146146
#:
147-
#: :type: GogsRepo.Permissions
147+
#: :type: :class:`~GogsRepo.Permissions`
148148
permissions = attr.ib(convert=lambda data: GogsRepo.Permissions.from_json(data))
149149

150150
#: Gets the repository's parent, when a fork
151151
#:
152-
#: :type: GogsRepo
152+
#: :type: :class:`~GogsRepo`
153153
parent = attr.ib(convert=lambda data: GogsRepo.from_json(data) if data else None, default=None)
154154

155155
#: The description of the repository
@@ -298,7 +298,7 @@ class GogsBranch(GogsEntity):
298298

299299
#: The HEAD commit of the branch
300300
#:
301-
#: :type: entities.GogsCommit
301+
#: :type: :class:`~GogsCommit`
302302
commit = attr.ib(convert=lambda parsed_json: GogsCommit.from_json(parsed_json))
303303

304304

gogs_client/interface.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,12 @@ def get_branch(self, auth, username, repo_name, branch_name):
198198
"""
199199
Returns the branch with name ``branch_name`` in the repository with name ``repo_name``
200200
owned by the user with username ``username``.
201-
201+
202202
:param auth.Authentication auth: authentication object
203203
:param str username: username of owner of repository containing the branch
204204
:param str repo_name: name of the repository with the branch
205205
:param str branch_name: name of the branch to return
206-
:return a branch
206+
:return: a branch
207207
:rtype: GogsBranch
208208
:raises NetworkFailure: if there is an error communicating with the server
209209
:raises ApiFailure: if the request cannot be serviced
@@ -214,12 +214,13 @@ def get_branch(self, auth, username, repo_name, branch_name):
214214

215215
def get_branches(self, auth, username, repo_name):
216216
"""
217-
Returns the branches in the repository with name ``repo_name`` owned by the user with username ``username``.
217+
Returns the branches in the repository with name ``repo_name`` owned by the user
218+
with username ``username``.
218219
219220
:param auth.Authentication auth: authentication object
220221
:param str username: username of owner of repository containing the branch
221222
:param str repo_name: name of the repository with the branch
222-
:return a list of branches
223+
:return: a list of branches
223224
:rtype: List[GogsBranch]
224225
:raises NetworkFailure: if there is an error communicating with the server
225226
:raises ApiFailure: if the request cannot be serviced

0 commit comments

Comments
 (0)