Skip to content
Prev Previous commit
Next Next commit
Remove underscores
Signed-off-by: Paul Van Eck <[email protected]>
  • Loading branch information
pvaneck committed Aug 28, 2024
commit 60d1220cbe9c6aebd0449879286997f1add4d25e
10 changes: 3 additions & 7 deletions sdk/core/azure-core/azure/core/credentials_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
from types import TracebackType
from typing import Any, Optional, AsyncContextManager, Type, Union
from typing_extensions import Protocol, runtime_checkable
from .credentials import (
AccessToken as _AccessToken,
AccessTokenInfo as _AccessTokenInfo,
TokenRequestOptions as _TokenRequestOptions,
)
from .credentials import AccessToken, AccessTokenInfo, TokenRequestOptions


@runtime_checkable
Expand All @@ -24,7 +20,7 @@ async def get_token(
tenant_id: Optional[str] = None,
enable_cae: bool = False,
**kwargs: Any,
) -> _AccessToken:
) -> AccessToken:
"""Request an access token for `scopes`.

:param str scopes: The type of access needed.
Expand Down Expand Up @@ -56,7 +52,7 @@ async def __aexit__(
class AsyncSupportsTokenInfo(Protocol, AsyncContextManager["AsyncSupportsTokenInfo"]):
"""Protocol for classes able to provide OAuth access tokens with additional properties."""

async def get_token_info(self, *scopes: str, options: Optional[_TokenRequestOptions] = None) -> _AccessTokenInfo:
async def get_token_info(self, *scopes: str, options: Optional[TokenRequestOptions] = None) -> AccessTokenInfo:
"""Request an access token for `scopes`.

This is an alternative to `get_token` to enable certain scenarios that require additional properties
Expand Down