File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
durabletask-azuremanaged/durabletask/azuremanaged Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 22# Licensed under the MIT License.
33
44from azure .core .credentials import TokenCredential
5+ from typing import Optional
56
67from durabletask .azuremanaged .internal .durabletask_grpc_interceptor import \
78 DTSDefaultClientInterceptorImpl
@@ -13,7 +14,7 @@ class DurableTaskSchedulerClient(TaskHubGrpcClient):
1314 def __init__ (self , * ,
1415 host_address : str ,
1516 taskhub : str ,
16- token_credential : TokenCredential ,
17+ token_credential : Optional [ TokenCredential ] ,
1718 secure_channel : bool = True ):
1819
1920 if not taskhub :
Original file line number Diff line number Diff line change 22# Licensed under the MIT License.
33
44import grpc
5+ from typing import Optional
6+
57from azure .core .credentials import TokenCredential
68
79from durabletask .azuremanaged .internal .access_token_manager import \
@@ -15,7 +17,7 @@ class DTSDefaultClientInterceptorImpl (DefaultClientInterceptorImpl):
1517 StreamUnaryClientInterceptor and StreamStreamClientInterceptor from grpc to add an
1618 interceptor to add additional headers to all calls as needed."""
1719
18- def __init__ (self , token_credential : TokenCredential , taskhub_name : str ):
20+ def __init__ (self , token_credential : Optional [ TokenCredential ] , taskhub_name : str ):
1921 self ._metadata = [("taskhub" , taskhub_name )]
2022 super ().__init__ (self ._metadata )
2123
Original file line number Diff line number Diff line change 22# Licensed under the MIT License.
33
44from azure .core .credentials import TokenCredential
5+ from typing import Optional
56
67from durabletask .azuremanaged .internal .durabletask_grpc_interceptor import \
78 DTSDefaultClientInterceptorImpl
@@ -13,7 +14,7 @@ class DurableTaskSchedulerWorker(TaskHubGrpcWorker):
1314 def __init__ (self , * ,
1415 host_address : str ,
1516 taskhub : str ,
16- token_credential : TokenCredential ,
17+ token_credential : Optional [ TokenCredential ] ,
1718 secure_channel : bool = True ):
1819
1920 if not taskhub :
You can’t perform that action at this time.
0 commit comments