File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
sdk/core/azure-core/azure/core Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 55# -------------------------------------------------------------------------
66from collections import namedtuple
77from typing import Any , NamedTuple , Optional
8- from typing_extensions import Protocol
8+ from typing_extensions import Protocol , runtime_checkable
99import six
1010
1111
@@ -19,6 +19,7 @@ class AccessToken(NamedTuple):
1919AccessToken .expires_on .__doc__ = """The token's expiration time in Unix time."""
2020
2121
22+ @runtime_checkable
2223class TokenCredential (Protocol ):
2324 """Protocol for classes able to provide OAuth tokens."""
2425
Original file line number Diff line number Diff line change 33# Licensed under the MIT License.
44# ------------------------------------
55from typing import Any , Optional
6- from typing_extensions import Protocol
6+ from typing_extensions import Protocol , runtime_checkable
77from .credentials import AccessToken as _AccessToken
88
9+ @runtime_checkable
910class AsyncTokenCredential (Protocol ):
1011 """Protocol for classes able to provide OAuth tokens."""
1112
You can’t perform that action at this time.
0 commit comments