Skip to content

Commit 5e60f2e

Browse files
authored
[Identity] Fix some docstring/types (#42639)
Signed-off-by: Paul Van Eck <[email protected]>
1 parent 9da3961 commit 5e60f2e

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

sdk/identity/azure-identity/azure/identity/_bearer_token_provider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def get_bearer_token_provider(credential: TokenProvider, *scopes: str) -> Callab
3030
request.headers["Authorization"] = "Bearer " + bearer_token_provider()
3131
3232
:param credential: The credential used to authenticate the request.
33-
:type credential: ~azure.core.credentials.TokenCredential
33+
:type credential: ~azure.core.credentials.TokenProvider
3434
:param str scopes: The scopes required for the bearer token.
3535
:rtype: callable
3636
:return: A callable that returns a bearer token.

sdk/identity/azure-identity/azure/identity/_credentials/chained.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class ChainedTokenCredential:
4747
<"https://aka.ms/azsdk/python/identity/credential-chains#chainedtokencredential-overview">`__.
4848
4949
:param credentials: credential instances to form the chain
50-
:type credentials: ~azure.core.credentials.TokenCredential
50+
:type credentials: ~azure.core.credentials.TokenProvider
5151
5252
.. admonition:: Example:
5353

sdk/identity/azure-identity/azure/identity/aio/_bearer_token_provider.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# ------------------------------------
55
from typing import Callable, Coroutine, Any
66

7-
from azure.core.credentials_async import AsyncTokenCredential
7+
from azure.core.credentials_async import AsyncTokenProvider
88
from azure.core.pipeline.policies import AsyncBearerTokenCredentialPolicy
99
from azure.core.pipeline import PipelineRequest, PipelineContext
1010
from azure.core.rest import HttpRequest
@@ -14,7 +14,7 @@ def _make_request() -> PipelineRequest[HttpRequest]:
1414
return PipelineRequest(HttpRequest("CredentialWrapper", "https://fakeurl"), PipelineContext(None))
1515

1616

17-
def get_bearer_token_provider(credential: AsyncTokenCredential, *scopes: str) -> Callable[[], Coroutine[Any, Any, str]]:
17+
def get_bearer_token_provider(credential: AsyncTokenProvider, *scopes: str) -> Callable[[], Coroutine[Any, Any, str]]:
1818
"""Returns a callable that provides a bearer token.
1919
2020
It can be used for instance to write code like:
@@ -31,7 +31,7 @@ def get_bearer_token_provider(credential: AsyncTokenCredential, *scopes: str) ->
3131
request.headers["Authorization"] = "Bearer " + await bearer_token_provider()
3232
3333
:param credential: The credential used to authenticate the request.
34-
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
34+
:type credential: ~azure.core.credentials_async.AsyncTokenProvider
3535
:param str scopes: The scopes required for the bearer token.
3636
:rtype: coroutine
3737
:return: A coroutine that returns a bearer token.

sdk/identity/azure-identity/azure/identity/aio/_credentials/chained.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class ChainedTokenCredential(AsyncContextManager):
2525
https://aka.ms/azsdk/python/identity/credential-chains#chainedtokencredential-overview.
2626
2727
:param credentials: credential instances to form the chain
28-
:type credentials: ~azure.core.credentials_async.AsyncTokenCredential
28+
:type credentials: ~azure.core.credentials_async.AsyncTokenProvider
2929
3030
.. admonition:: Example:
3131

0 commit comments

Comments
 (0)