Skip to content

Commit 2497224

Browse files
committed
authn: Correct docstring of renew()
@victorlin pointed out¹ that a UserError is not raised by this function. While correcting that, I noted that other docstrings in this module use "saved credentials" as the term (matching the term we use in user-visible output) instead of "tokens", so I made this docstring follow suit. ¹ <#333 (comment)>
1 parent 362cfad commit 2497224

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

nextstrain/cli/authn/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,13 @@ def login(origin: Origin, credentials: Optional[Callable[[], Tuple[str, str]]] =
100100

101101
def renew(origin: Origin) -> Optional[User]:
102102
"""
103-
Renews existing tokens for *origin*, if possible.
103+
Renews existing saved credentials for *origin*, if possible.
104104
105105
Returns a :class:`User` object with renewed information about the logged in
106106
user when successful.
107107
108-
Raises a :class:`UserError` if authentication fails.
108+
Returns ``None`` if there are no saved credentials or if they're unable to
109+
be automatically renewed.
109110
"""
110111
assert origin
111112

0 commit comments

Comments
 (0)