From 41bd4965316260fd19ef3c125ff13c3177483483 Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Wed, 10 Jun 2020 18:30:47 -0400 Subject: [PATCH 1/3] have AzureKeyCredentialPolicy accept and ignore kwargs --- .../azure/core/pipeline/policies/_authentication.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/_authentication.py b/sdk/core/azure-core/azure/core/pipeline/policies/_authentication.py index 36edd3cbc020..3f14046ea885 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/_authentication.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/_authentication.py @@ -102,8 +102,8 @@ class AzureKeyCredentialPolicy(SansIOHTTPPolicy): :param str name: The name of the key header used for the credential. :raises: ValueError or TypeError """ - def __init__(self, credential, name): - # type: (AzureKeyCredential, str) -> None + def __init__(self, credential, name, **kwargs): + # type: (AzureKeyCredential, str, Any) -> None super(AzureKeyCredentialPolicy, self).__init__() self._credential = credential if not name: From 9c1bf10b21247814336ae91a1f53ba89467803d6 Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Thu, 11 Jun 2020 12:20:21 -0400 Subject: [PATCH 2/3] fix pylint --- .../azure-core/azure/core/pipeline/policies/_authentication.py | 2 +- sdk/core/azure-core/azure/core/polling/_poller.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/_authentication.py b/sdk/core/azure-core/azure/core/pipeline/policies/_authentication.py index 3f14046ea885..be555583d58c 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/_authentication.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/_authentication.py @@ -102,7 +102,7 @@ class AzureKeyCredentialPolicy(SansIOHTTPPolicy): :param str name: The name of the key header used for the credential. :raises: ValueError or TypeError """ - def __init__(self, credential, name, **kwargs): + def __init__(self, credential, name, **kwargs): # pylint: disable=unused-argument # type: (AzureKeyCredential, str, Any) -> None super(AzureKeyCredentialPolicy, self).__init__() self._credential = credential diff --git a/sdk/core/azure-core/azure/core/polling/_poller.py b/sdk/core/azure-core/azure/core/polling/_poller.py index a9f670504859..35c8ea1ed205 100644 --- a/sdk/core/azure-core/azure/core/polling/_poller.py +++ b/sdk/core/azure-core/azure/core/polling/_poller.py @@ -31,7 +31,7 @@ except ImportError: from urllib.parse import urlparse -from typing import Any, Callable, Union, List, Optional, Tuple, TypeVar, Generic +from typing import Any, Callable, Union, List, Optional, TypeVar, Generic from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.common import with_current_context From 151a4df9c7c95b5c2afd36b51ded9dd523b6e148 Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Thu, 11 Jun 2020 17:11:33 -0400 Subject: [PATCH 3/3] updated changelog --- sdk/core/azure-core/CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sdk/core/azure-core/CHANGELOG.md b/sdk/core/azure-core/CHANGELOG.md index bc650815c813..ca1427a75ab2 100644 --- a/sdk/core/azure-core/CHANGELOG.md +++ b/sdk/core/azure-core/CHANGELOG.md @@ -3,6 +3,9 @@ ## 1.6.1 (Unreleased) +### Bug fixes + +- `AzureKeyCredentialPolicy` will now accept (and ignore) passed in kwargs #11963 ## 1.6.0 (2020-06-03)