Skip to content

Commit

Permalink
Add missing __init__ type annotations (#12146)
Browse files Browse the repository at this point in the history
  • Loading branch information
chlowell authored Jun 23, 2020
1 parent ca4f2b1 commit 78ffbba
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class DefaultAzureCredential(ChainedTokenCredential):
"""

def __init__(self, **kwargs):
# type: (**Any) -> None
authority = kwargs.pop("authority", None)
authority = normalize_authority(authority) if authority else get_default_authority()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,15 @@

if TYPE_CHECKING:
# pylint:disable=unused-import,ungrouped-imports
from typing import Any, Iterable, Optional
from typing import Any
from azure.core.credentials import AccessToken


class VSCodeCredential(object):
"""Authenticates by redeeming a refresh token previously saved by VS Code
"""
"""Authenticates by redeeming a refresh token previously saved by VS Code"""

def __init__(self, **kwargs):
# type: (**Any) -> None
self._client = kwargs.pop("_client", None) or AadClient("organizations", AZURE_VSCODE_CLIENT_ID, **kwargs)
self._refresh_token = None

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class DefaultAzureCredential(ChainedTokenCredential):
Defaults to the value of environment variable AZURE_TENANT_ID, if any.
"""

def __init__(self, **kwargs):
def __init__(self, **kwargs: "Any") -> None:
authority = kwargs.pop("authority", None)
authority = normalize_authority(authority) if authority else get_default_authority()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@

if TYPE_CHECKING:
# pylint:disable=unused-import,ungrouped-imports
from typing import Any, Iterable, Optional
from typing import Any
from azure.core.credentials import AccessToken


class VSCodeCredential(AsyncCredentialBase):
"""Authenticates by redeeming a refresh token previously saved by VS Code
"""Authenticates by redeeming a refresh token previously saved by VS Code"""

"""

def __init__(self, **kwargs):
def __init__(self, **kwargs: "Any") -> None:
self._client = kwargs.pop("_client", None) or AadClient("organizations", AZURE_VSCODE_CLIENT_ID, **kwargs)
self._refresh_token = None

Expand Down

0 comments on commit 78ffbba

Please sign in to comment.