Skip to content

Commit ac9fe7e

Browse files
authored
docs: update docstring of to_json() method (#511)
from #494, this PR updated the docstring of ``to_json`` method in the credential so that it points user to ``from_authorized_user_info`` instead of the non-existent ``from_json``
1 parent f7fe7d3 commit ac9fe7e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/google-auth/google/oauth2/credentials.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,9 @@ def to_json(self, strip=None):
300300
generated JSON.
301301
302302
Returns:
303-
str: A JSON representation of this instance, suitable to pass to
304-
from_json().
303+
str: A JSON representation of this instance. When converted into
304+
a dictionary, it can be passed to from_authorized_user_info()
305+
to create a new credential instance.
305306
"""
306307
prep = {
307308
"token": self.token,

0 commit comments

Comments
 (0)