3
3
# Licensed under the MIT License. See LICENSE.txt in the project root for
4
4
# license information.
5
5
# --------------------------------------------------------------------------
6
- from typing import Any , Callable , Mapping , Optional
6
+ from typing import Any , Callable , Mapping , Optional , TYPE_CHECKING
7
+ if TYPE_CHECKING :
8
+ try :
9
+ from azure .core .credentials import SupportsGetToken
10
+ except ImportError :
11
+ # SupportsGetToken is a typing_extensions.Protocol; we don't depend on that package
12
+ pass
7
13
8
- from azure .core .credentials import SupportsGetToken
9
14
from azure .core .async_paging import AsyncPagedMixin
10
15
from azure .core .configuration import Configuration
11
16
from azure .core .pipeline import AsyncPipeline
@@ -47,7 +52,7 @@ class _AsyncKeyVaultClientBase:
47
52
48
53
@staticmethod
49
54
def create_config (
50
- credential : SupportsGetToken , api_version : str = None , ** kwargs : Mapping [str , Any ]
55
+ credential : " SupportsGetToken" , api_version : str = None , ** kwargs : Mapping [str , Any ]
51
56
) -> Configuration :
52
57
if api_version is None :
53
58
api_version = KeyVaultClient .DEFAULT_API_VERSION
@@ -58,7 +63,7 @@ def create_config(
58
63
def __init__ (
59
64
self ,
60
65
vault_url : str ,
61
- credential : SupportsGetToken ,
66
+ credential : " SupportsGetToken" ,
62
67
config : Configuration = None ,
63
68
transport : HttpTransport = None ,
64
69
api_version : str = None ,
0 commit comments