File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 11import abc
22import logging
3- from typing import Callable , Dict , List
3+ from typing import Callable , Dict , List , Optional
44from databricks .sql .common .http import HttpHeader
55from databricks .sql .auth .oauth import (
66 OAuthManager ,
@@ -183,11 +183,11 @@ class AzureServicePrincipalCredentialProvider(CredentialsProvider):
183183
184184 def __init__ (
185185 self ,
186- hostname : str ,
187- oauth_client_id : str ,
188- oauth_client_secret : str ,
189- azure_tenant_id : str ,
190- azure_workspace_resource_id : str = None ,
186+ hostname : Optional [ str ] ,
187+ oauth_client_id : Optional [ str ] ,
188+ oauth_client_secret : Optional [ str ] ,
189+ azure_tenant_id : Optional [ str ] ,
190+ azure_workspace_resource_id : Optional [ str ] = None ,
191191 ):
192192 self .hostname = hostname
193193 self .oauth_client_id = oauth_client_id
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ def get_token(self) -> Token:
5959 pass
6060
6161 @abstractmethod
62- def refresh (self ):
62+ def refresh (self ) -> Token :
6363 pass
6464
6565
@@ -334,7 +334,7 @@ def get_token(self) -> Token:
334334 self .token = self .refresh ()
335335 return self .token
336336
337- def refresh (self ) -> None :
337+ def refresh (self ) -> Token :
338338 headers = {
339339 HttpHeader .CONTENT_TYPE .value : "application/x-www-form-urlencoded" ,
340340 }
You can’t perform that action at this time.
0 commit comments