Skip to content

Commit 9a8fc01

Browse files
authored
Merge pull request #8 from tcfranks/main
annotated return types for request_codes(self), wait_for_authorizatio…
2 parents fa292e8 + 8eaa0e5 commit 9a8fc01

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

adafruit_oauth2.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def __init__(
9191
# Refresh tokens are valid until the user revokes access
9292
self.refresh_token = refresh_token
9393

94-
def request_codes(self):
94+
def request_codes(self) -> None:
9595
"""Identifies your application and access scopes with Google's
9696
authorization server. Attempts to request device and user codes
9797
"""
@@ -118,7 +118,7 @@ def request_codes(self):
118118
self.verification_url = json_resp["verification_url"]
119119
self.user_code = json_resp["user_code"]
120120

121-
def wait_for_authorization(self):
121+
def wait_for_authorization(self) -> bool:
122122
"""Blocking method which polls Google's authorization server
123123
until a response from Google's authorization server indicating
124124
that the user has responded to the access request, or until the
@@ -164,7 +164,7 @@ def wait_for_authorization(self):
164164
self.access_token_scope = json_resp["scope"]
165165
return True
166166

167-
def refresh_access_token(self):
167+
def refresh_access_token(self) -> bool:
168168
"""Refreshes an expired access token.
169169
:return: True if able to refresh an access token, False otherwise.
170170

0 commit comments

Comments
 (0)