File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ def CreateCreds(args: argparse.Namespace) -> Credentials:
155155 # If there are no (valid) credentials available, let the user log in.
156156 if not creds or not creds .valid :
157157 if creds and creds .expired and creds .refresh_token :
158- creds .refresh (Request ())
158+ creds .refresh (Request ()) # type: ignore[no-untyped-call]
159159 else :
160160 if not args .client_id or not args .client_secret :
161161 raise ValueError ("Required flag --client_id or --client_secret missing" )
@@ -182,7 +182,7 @@ def CreateCreds(args: argparse.Namespace) -> Credentials:
182182 raise
183183 with open (token_cache , "wb" ) as token :
184184 pickle .dump (creds , token )
185- return creds
185+ return creds # type: ignore[no-untyped-call]
186186
187187
188188def PrintStructure (structure : Structure , output_type : str ) -> None :
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ def refresh_creds(creds: Credentials) -> Credentials:
3838 This is not part of the subscriber API, exposed only to facilitate testing.
3939 """
4040 try :
41- creds .refresh (Request ())
41+ creds .refresh (Request ()) # type: ignore[no-untyped-call]
4242 except RefreshError as err :
4343 raise AuthException (f"Authentication refresh failure: { err } " ) from err
4444 except TransportError as err :
@@ -165,7 +165,7 @@ async def _async_get_client(self) -> pubsub_v1.SubscriberAsyncClient:
165165 DIAGNOSTICS .increment ("create_subscription.creds_error" )
166166 raise AuthException (f"Access token failure: { err } " ) from err
167167 _LOGGER .debug ("Credentials refreshed, new expiry %s" , creds .expiry )
168- self ._creds = creds
168+ self ._creds = creds # type: ignore[no-untyped-call]
169169 self ._client = pubsub_v1 .SubscriberAsyncClient (credentials = self ._creds )
170170 return self ._client
171171
Original file line number Diff line number Diff line change @@ -31,9 +31,9 @@ async def test_refresh_creds() -> None:
3131@pytest .mark .parametrize (
3232 ("raised" , "expected" ),
3333 [
34- (RefreshError (), AuthException ),
35- (TransportError (), SubscriberException ),
36- (GoogleAuthError (), SubscriberException ),
34+ (RefreshError (), AuthException ), # type: ignore[no-untyped-call]
35+ (TransportError (), SubscriberException ), # type: ignore[no-untyped-call]
36+ (GoogleAuthError (), SubscriberException ), # type: ignore[no-untyped-call]
3737 ],
3838)
3939async def test_refresh_creds_error (raised : Exception , expected : Any ) -> None :
You can’t perform that action at this time.
0 commit comments