mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 19:31:10 +00:00
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:
+1
-1
@@ -257,7 +257,7 @@ class Github(object):
|
||||
"""
|
||||
:calls: `GET /users/:user <http://developer.github.com/v3/users>`_ or `GET /user <http://developer.github.com/v3/users>`_
|
||||
:param login: string
|
||||
:rtype: :class:`github.NamedUser.NamedUser`
|
||||
:rtype: :class:`github.NamedUser.NamedUser` or :class:`github.AuthenticatedUser.AuthenticatedUser`
|
||||
"""
|
||||
assert login is github.GithubObject.NotSet or isinstance(login, str), login
|
||||
if login is github.GithubObject.NotSet:
|
||||
|
||||
Reference in New Issue
Block a user