More precise typing for MainClass.get_user() (#1575)

Use typing.overload for MainClass.get_user() since it can return two
disparate types. Correct the docstring for it, as well as locking down
Sphinx to <3 due to built docs issue and drive-by link correction.

Fixes #1550
This commit is contained in:
Steve Kowalik
2020-06-24 16:21:18 +10:00
committed by GitHub
parent f0f6ec83dd
commit 3668f866e3
5 changed files with 11 additions and 8 deletions
+1 -1
View File
@@ -2924,7 +2924,7 @@ class Repository(github.GithubObject.CompletableGithubObject):
def get_releases(self):
"""
:calls: `GET /repos/:owner/:repo/releases <https://developer.github.com/v3/repos/releases/#list-releases-for-a-repository`_
:calls: `GET /repos/:owner/:repo/releases <https://developer.github.com/v3/repos/releases/#list-releases-for-a-repository>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.GitRelease.GitRelease`
"""
return github.PaginatedList.PaginatedList(